NLS cleanup in ecpglib
authorPeter Eisentraut <peter_e@gmx.net>
Thu, 15 Jan 2009 11:52:55 +0000 (11:52 +0000)
committerPeter Eisentraut <peter_e@gmx.net>
Thu, 15 Jan 2009 11:52:55 +0000 (11:52 +0000)
Replace leftover instances of _() by ecpg_gettext(), the latter being the
correct way to refer to the library's message catalog, instead of the one of
the program using the library.

Drop NLS support for ecpg_log(), which is a debugging instrument similar to
elog() in the backend.

We cannot support NLS in the ecpg compatlib, because that requires
ecpg_gettext, which is in ecpglib, which is not a dependency of compatlib.  It
doesn't seem worthwhile to worry about this, since the only translatable
string is "out of memory", and gettext probably won't be able to do much
without memory either.

Adjust messages to project style.

16 files changed:
src/interfaces/ecpg/compatlib/informix.c
src/interfaces/ecpg/ecpglib/connect.c
src/interfaces/ecpg/ecpglib/data.c
src/interfaces/ecpg/ecpglib/descriptor.c
src/interfaces/ecpg/ecpglib/error.c
src/interfaces/ecpg/ecpglib/execute.c
src/interfaces/ecpg/ecpglib/misc.c
src/interfaces/ecpg/ecpglib/nls.mk
src/interfaces/ecpg/test/expected/connect-test2.stderr
src/interfaces/ecpg/test/expected/connect-test3.stderr
src/interfaces/ecpg/test/expected/connect-test4.stderr
src/interfaces/ecpg/test/expected/connect-test5.stderr
src/interfaces/ecpg/test/expected/preproc-init.stderr
src/interfaces/ecpg/test/expected/preproc-whenever.stderr
src/interfaces/ecpg/test/expected/sql-fetch.stderr
src/interfaces/ecpg/test/expected/sql-quote.stderr

index b5ee3e6738649c3a4eea1a72a71a8948e38f966c..f58802ef3613e5f027e62509c223d04f74141ac0 100644 (file)
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/informix.c,v 1.56 2008/11/01 08:55:21 meskes Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/informix.c,v 1.57 2009/01/15 11:52:54 petere Exp $ */
 
 #define POSTGRES_ECPG_INTERNAL
 #include "postgres_fe.h"
@@ -1010,7 +1010,7 @@ ECPG_informix_set_var(int number, void *pointer, int lineno)
 
        sqlca->sqlcode = ECPG_OUT_OF_MEMORY;
        strncpy(sqlca->sqlstate, "YE001", sizeof("YE001"));
-       snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc), _("out of memory on line %d"), lineno);
+       snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc), "out of memory on line %d", lineno);
        sqlca->sqlerrm.sqlerrml = strlen(sqlca->sqlerrm.sqlerrmc);
        /* free all memory we have allocated for the user */
        ECPGfree_auto_mem();
index 48d991d5068f299a018fc66fe14d8ad41f3761f2..d73199971e856dfbb44cd9402fe20b8961de8181 100644 (file)
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.52 2008/12/17 16:52:07 meskes Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.53 2009/01/15 11:52:55 petere Exp $ */
 
 #define POSTGRES_ECPG_INTERNAL
 #include "postgres_fe.h"
@@ -223,7 +223,7 @@ ECPGnoticeReceiver(void *arg, const PGresult *result)
        sqlstate = ECPG_SQLSTATE_ECPG_INTERNAL_ERROR;
 
    if (message == NULL)        /* Shouldn't happen, but need to be sure */
-       message = _("No message received");
+       message = ecpg_gettext("empty message text");
 
    /* these are not warnings */
    if (strncmp(sqlstate, "00", 2) == 0)
@@ -378,7 +378,7 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p
                        if (strncmp(dbname, "unix:", 5) != 0)
                        {
                            ecpg_log("ECPGconnect: socketname %s given for TCP connection on line %d\n", host, lineno);
-                           ecpg_raise(lineno, ECPG_CONNECT, ECPG_SQLSTATE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION, realname ? realname : _("<DEFAULT>"));
+                           ecpg_raise(lineno, ECPG_CONNECT, ECPG_SQLSTATE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION, realname ? realname : ecpg_gettext("<DEFAULT>"));
                            if (host)
                                ecpg_free(host);
 
@@ -404,7 +404,7 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p
                    if (strcmp(dbname + offset, "localhost") != 0 && strcmp(dbname + offset, "127.0.0.1") != 0)
                    {
                        ecpg_log("ECPGconnect: non-localhost access via sockets on line %d\n", lineno);
-                       ecpg_raise(lineno, ECPG_CONNECT, ECPG_SQLSTATE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION, realname ? realname : _("<DEFAULT>"));
+                       ecpg_raise(lineno, ECPG_CONNECT, ECPG_SQLSTATE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION, realname ? realname : ecpg_gettext("<DEFAULT>"));
                        if (host)
                            ecpg_free(host);
                        if (port)
@@ -471,11 +471,11 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p
    actual_connection = all_connections;
 
    ecpg_log("ECPGconnect: opening database %s on %s port %s %s%s %s%s\n",
-            realname ? realname : _("<DEFAULT>"),
-            host ? host : _("<DEFAULT>"),
-            port ? (ecpg_internal_regression_mode ? _("<REGRESSION_PORT>") : port) : _("<DEFAULT>"),
-            options ? _("with options ") : "", options ? options : "",
-            user ? _("for user ") : "", user ? user : "");
+            realname ? realname : "<DEFAULT>",
+            host ? host : "<DEFAULT>",
+            port ? (ecpg_internal_regression_mode ? "<REGRESSION_PORT>" : port) : "<DEFAULT>",
+            options ? "with options " : "", options ? options : "",
+            user ? "for user " : "", user ? user : "");
 
    connect_string = ecpg_alloc(      strlen_or_null(host)
                    + strlen_or_null(port)
@@ -515,7 +515,7 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p
    if (PQstatus(this->connection) == CONNECTION_BAD)
    {
        const char *errmsg = PQerrorMessage(this->connection);
-       const char *db = realname ? realname : _("<DEFAULT>");
+       const char *db = realname ? realname : ecpg_gettext("<DEFAULT>");
 
        ecpg_log("ECPGconnect: could not open database: %s\n", errmsg);
 
index 392ebdde7737d2817f69359cd0299f68bd2ea7d3..9ec78a599dcfbf42c1e16b6e577b4f4f03334b62 100644 (file)
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/data.c,v 1.41 2008/05/16 15:20:03 petere Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/data.c,v 1.42 2009/01/15 11:52:55 petere Exp $ */
 
 #define POSTGRES_ECPG_INTERNAL
 #include "postgres_fe.h"
@@ -60,7 +60,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
    else
        log_offset = offset;
 
-   ecpg_log("ecpg_get_data on line %d: RESULT: %s offset: %ld; array: %s\n", lineno, pval ? (binary ? _("BINARY") : pval) : _("EMPTY"), log_offset, isarray ? _("yes") : _("no"));
+   ecpg_log("ecpg_get_data on line %d: RESULT: %s offset: %ld; array: %s\n", lineno, pval ? (binary ? "BINARY" : pval) : "EMPTY", log_offset, isarray ? "yes" : "no");
 
    /* We will have to decode the value */
 
@@ -360,7 +360,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
                            else
                                ecpg_raise(lineno, ECPG_CONVERT_BOOL,
                                           ECPG_SQLSTATE_DATATYPE_MISMATCH,
-                                          _("different size"));
+                                          NULL);
                            break;
                        }
                        else if (pval[0] == 't' && pval[1] == '\0')
@@ -372,7 +372,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
                            else
                                ecpg_raise(lineno, ECPG_CONVERT_BOOL,
                                           ECPG_SQLSTATE_DATATYPE_MISMATCH,
-                                          _("different size"));
+                                          NULL);
                            break;
                        }
                        else if (pval[0] == '\0' && PQgetisnull(results, act_tuple, act_field))
index 457ee04df5f2ad404dcbe63c96910e62f0fe4b7f..0331d12c8d747a3a9dc17a87a154cc88d6ff40e6 100644 (file)
@@ -1,6 +1,6 @@
 /* dynamic SQL support routines
  *
- * $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/descriptor.c,v 1.30 2008/05/16 15:20:03 petere Exp $
+ * $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/descriptor.c,v 1.31 2009/01/15 11:52:55 petere Exp $
  */
 
 #define POSTGRES_ECPG_INTERNAL
@@ -724,6 +724,6 @@ ecpg_find_desc(int line, const char *name)
 bool
 ECPGdescribe(int line, bool input, const char *statement,...)
 {
-   ecpg_log("ECPGdescribe called on line %d for %s: %s\n", line, (input) ? _("input") : _("output"), statement);
+   ecpg_log("ECPGdescribe called on line %d for %s: %s\n", line, input ? "input" : "output", statement);
    return false;
 }
index a36f374e7d39830444f3b3f03b8131d7ffe245fb..697862a7a0aba929d535342522dc361f5b6a608d 100644 (file)
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/error.c,v 1.20 2008/05/16 15:20:03 petere Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/error.c,v 1.21 2009/01/15 11:52:55 petere Exp $ */
 
 #define POSTGRES_ECPG_INTERNAL
 #include "postgres_fe.h"
@@ -37,7 +37,7 @@ ecpg_raise(int line, int code, const char *sqlstate, const char *str)
            snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
                /* translator: this string will be truncated at 149 
                   characters expanded.  */
-                    ecpg_gettext("unsupported type %s on line %d"), str, line);
+                    ecpg_gettext("unsupported type \"%s\" on line %d"), str, line);
            break;
 
        case ECPG_TOO_MANY_ARGUMENTS:
@@ -58,28 +58,34 @@ ecpg_raise(int line, int code, const char *sqlstate, const char *str)
            snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
                /* translator: this string will be truncated at 149 
                   characters expanded.  */
-                    ecpg_gettext("not correctly formatted int type \"%s\" on line %d"), str, line);
+                    ecpg_gettext("invalid input syntax for type int: \"%s\", on line %d"), str, line);
            break;
 
        case ECPG_UINT_FORMAT:
            snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
                /* translator: this string will be truncated at 149 
                   characters expanded.  */
-                    ecpg_gettext("not correctly formatted unsigned type \"%s\" on line %d"), str, line);
+                    ecpg_gettext("invalid input syntax for type unsigned int: \"%s\", on line %d"), str, line);
            break;
 
        case ECPG_FLOAT_FORMAT:
            snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
                /* translator: this string will be truncated at 149 
                   characters expanded.  */
-                    ecpg_gettext("not correctly formatted floating-point type \"%s\" on line %d"), str, line);
+                    ecpg_gettext("invalid input syntax for floating-point type: \"%s\", on line %d"), str, line);
            break;
 
        case ECPG_CONVERT_BOOL:
-           snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
-               /* translator: this string will be truncated at 149 
-                  characters expanded.  */
-                    ecpg_gettext("could not convert %s to bool on line %d"), str, line);
+           if (str)
+               snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
+                        /* translator: this string will be truncated at 149 
+                           characters expanded.  */
+                        ecpg_gettext("invalid syntax for type boolean: \"%s\", on line %d"), str, line);
+           else
+               snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
+                        /* translator: this string will be truncated at 149 
+                           characters expanded.  */
+                        ecpg_gettext("could not convert boolean value: size mismatch, on line %d"), line);
            break;
 
        case ECPG_EMPTY:
@@ -93,7 +99,7 @@ ecpg_raise(int line, int code, const char *sqlstate, const char *str)
            snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
                /* translator: this string will be truncated at 149 
                   characters expanded.  */
-                    ecpg_gettext("NULL value without indicator on line %d"), line);
+                    ecpg_gettext("null value without indicator on line %d"), line);
            break;
 
        case ECPG_NO_ARRAY:
@@ -107,7 +113,7 @@ ecpg_raise(int line, int code, const char *sqlstate, const char *str)
            snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
                /* translator: this string will be truncated at 149 
                   characters expanded.  */
-                    ecpg_gettext("data read from backend is not an array on line %d"), line);
+                    ecpg_gettext("data read from server is not an array on line %d"), line);
            break;
 
        case ECPG_ARRAY_INSERT:
@@ -121,7 +127,7 @@ ecpg_raise(int line, int code, const char *sqlstate, const char *str)
            snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
                /* translator: this string will be truncated at 149 
                   characters expanded.  */
-                ecpg_gettext("no such connection %s on line %d"), str, line);
+                ecpg_gettext("connection \"%s\" does not exist on line %d"), str, line);
            break;
 
        case ECPG_NOT_CONN:
@@ -135,14 +141,14 @@ ecpg_raise(int line, int code, const char *sqlstate, const char *str)
            snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
                /* translator: this string will be truncated at 149 
                   characters expanded.  */
-                ecpg_gettext("invalid statement name %s on line %d"), str, line);
+                ecpg_gettext("invalid statement name \"%s\" on line %d"), str, line);
            break;
 
        case ECPG_UNKNOWN_DESCRIPTOR:
            snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
                /* translator: this string will be truncated at 149 
                   characters expanded.  */
-                ecpg_gettext("descriptor %s not found on line %d"), str, line);
+                ecpg_gettext("descriptor \"%s\" not found on line %d"), str, line);
            break;
 
        case ECPG_INVALID_DESCRIPTOR_INDEX:
@@ -156,7 +162,7 @@ ecpg_raise(int line, int code, const char *sqlstate, const char *str)
            snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc),
                /* translator: this string will be truncated at 149 
                   characters expanded.  */
-                ecpg_gettext("unknown descriptor item %s on line %d"), str, line);
+                ecpg_gettext("unrecognized descriptor item \"%s\" on line %d"), str, line);
            break;
 
        case ECPG_VAR_NOT_NUMERIC:
@@ -304,5 +310,5 @@ sqlprint(void)
    struct sqlca_t *sqlca = ECPGget_sqlca();
 
    sqlca->sqlerrm.sqlerrmc[sqlca->sqlerrm.sqlerrml] = '\0';
-   fprintf(stderr, _("sql error: %s\n"), sqlca->sqlerrm.sqlerrmc);
+   fprintf(stderr, ecpg_gettext("SQL error: %s\n"), sqlca->sqlerrm.sqlerrmc);
 }
index a6e58f0eaeade77aeca24c1c567ebe5ed5557faa..1605ec0dc8a2248406e6c2e7f0eb513fdfd71141 100644 (file)
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.78 2008/05/16 15:20:03 petere Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.79 2009/01/15 11:52:55 petere Exp $ */
 
 /*
  * The aim is to get a simpler inteface to the database routines.
@@ -301,7 +301,7 @@ ecpg_is_type_an_array(int type, const struct statement * stmt, const struct vari
        return (ECPG_ARRAY_ERROR);
 
    ecpg_type_infocache_push(&(stmt->connection->cache_head), type, isarray, stmt->lineno);
-   ecpg_log("ecpg_is_type_an_array on line %d: type (%d); C (%d); array (%s)\n", stmt->lineno, type, var->type, isarray ? _("yes") : _("no"));
+   ecpg_log("ecpg_is_type_an_array on line %d: type (%d); C (%d); array (%s)\n", stmt->lineno, type, var->type, isarray ? "yes" : "no");
    return isarray;
 }
 
@@ -729,7 +729,7 @@ ecpg_store_input(const int lineno, const bool force_indicator, const struct vari
                        for (element = 0; element < var->arrsize; element++)
                            sprintf(mallocedval + strlen(mallocedval), "%c,", (((int *) var->value)[element]) ? 't' : 'f');
                    else
-                       ecpg_raise(lineno, ECPG_CONVERT_BOOL, ECPG_SQLSTATE_DATATYPE_MISMATCH, _("different size"));
+                       ecpg_raise(lineno, ECPG_CONVERT_BOOL, ECPG_SQLSTATE_DATATYPE_MISMATCH, NULL);
 
                    strcpy(mallocedval + strlen(mallocedval) - 1, "]");
                }
@@ -740,7 +740,7 @@ ecpg_store_input(const int lineno, const bool force_indicator, const struct vari
                    else if (var->offset == sizeof(int))
                        sprintf(mallocedval, "%c", (*((int *) var->value)) ? 't' : 'f');
                    else
-                       ecpg_raise(lineno, ECPG_CONVERT_BOOL, ECPG_SQLSTATE_DATATYPE_MISMATCH, _("different size"));
+                       ecpg_raise(lineno, ECPG_CONVERT_BOOL, ECPG_SQLSTATE_DATATYPE_MISMATCH, NULL);
                }
 
                *tobeinserted_p = mallocedval;
@@ -1042,7 +1042,7 @@ free_params(const char **paramValues, int nParams, bool print, int lineno)
    for (n = 0; n < nParams; n++)
    {
        if (print)
-           ecpg_log("free_params on line %d: parameter %d = %s\n", lineno, n + 1, paramValues[n] ? paramValues[n] : _("null"));
+           ecpg_log("free_params on line %d: parameter %d = %s\n", lineno, n + 1, paramValues[n] ? paramValues[n] : "null");
        ecpg_free((void *) (paramValues[n]));
    }
    ecpg_free(paramValues);
@@ -1625,7 +1625,7 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char
    if (con == NULL || con->connection == NULL)
    {
        free_statement(stmt);
-       ecpg_raise(lineno, ECPG_NOT_CONN, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, (con) ? con->name : _("<empty>"));
+       ecpg_raise(lineno, ECPG_NOT_CONN, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, (con) ? con->name : ecpg_gettext("<empty>"));
        setlocale(LC_NUMERIC, oldlocale);
        ecpg_free(oldlocale);
        return false;
index 242ab0a7d65c2eb450f253af6e6f16dd90b05c18..47c343f7d427c1ee9b35090ad4e4665c8ce35177 100644 (file)
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.47 2009/01/02 13:26:54 petere Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.48 2009/01/15 11:52:55 petere Exp $ */
 
 #define POSTGRES_ECPG_INTERNAL
 #include "postgres_fe.h"
@@ -110,7 +110,7 @@ ecpg_init(const struct connection * con, const char *connection_name, const int
    if (con == NULL)
    {
        ecpg_raise(lineno, ECPG_NO_CONN, ECPG_SQLSTATE_CONNECTION_DOES_NOT_EXIST,
-                  connection_name ? connection_name : _("NULL"));
+                  connection_name ? connection_name : ecpg_gettext("NULL"));
        return (false);
    }
 
@@ -179,7 +179,7 @@ ECPGtrans(int lineno, const char *connection_name, const char *transaction)
    if (!ecpg_init(con, connection_name, lineno))
        return (false);
 
-   ecpg_log("ECPGtrans on line %d: action \"%s\"; connection \"%s\"\n", lineno, transaction, con ? con->name : _("null"));
+   ecpg_log("ECPGtrans on line %d: action \"%s\"; connection \"%s\"\n", lineno, transaction, con ? con->name : "null");
 
    /* if we have no connection we just simulate the command */
    if (con && con->connection)
index ebe2082d8bcd49107ef424052493e1905da3107a..86b192373176c0bcfed866249b3741ffd615e7f5 100644 (file)
@@ -1,5 +1,5 @@
 # $PostgreSQL $
 CATALOG_NAME    = ecpglib
 AVAIL_LANGUAGES     =
-GETTEXT_FILES   = ../compatlib/informix.c connect.c data.c descriptor.c error.c execute.c misc.c prepare.c
-GETTEXT_TRIGGERS = _ ecpg_gettext ecpg_log
+GETTEXT_FILES   = connect.c error.c execute.c misc.c
+GETTEXT_TRIGGERS = ecpg_gettext
index 079fea215263c22d467fb396e57655f5e88f09c1..1709ed0b4cb1be6a24a6deada6795b2731853f36 100644 (file)
@@ -46,7 +46,7 @@
 [NO_PID]: sqlca: code: 0, state: 00000
 [NO_PID]: ecpg_get_data on line 37: RESULT: regress1 offset: -1; array: yes
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: raising sqlcode -220 on line 40: no such connection first on line 40
+[NO_PID]: raising sqlcode -220 on line 40: connection "first" does not exist on line 40
 [NO_PID]: sqlca: code: -220, state: 08003
 [NO_PID]: ecpg_finish: connection second closed
 [NO_PID]: sqlca: code: 0, state: 00000
index a7e39bf401b75c564749f9c4d7b8fd303ee8a836..370827ae6b019b414bded354adf6c57bd9cdc9da 100644 (file)
@@ -24,7 +24,7 @@
 [NO_PID]: sqlca: code: 0, state: 00000
 [NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>  
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: raising sqlcode -220 on line 35: no such connection DEFAULT on line 35
+[NO_PID]: raising sqlcode -220 on line 35: connection "DEFAULT" does not exist on line 35
 [NO_PID]: sqlca: code: -220, state: 08003
 [NO_PID]: ECPGconnect: connection identifier second is already in use
 [NO_PID]: sqlca: code: 0, state: 00000
@@ -32,7 +32,7 @@
 [NO_PID]: sqlca: code: 0, state: 00000
 [NO_PID]: ecpg_finish: connection first closed
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: raising sqlcode -220 on line 40: no such connection CURRENT on line 40
+[NO_PID]: raising sqlcode -220 on line 40: connection "CURRENT" does not exist on line 40
 [NO_PID]: sqlca: code: -220, state: 08003
-[NO_PID]: raising sqlcode -220 on line 41: no such connection DEFAULT on line 41
+[NO_PID]: raising sqlcode -220 on line 41: connection "DEFAULT" does not exist on line 41
 [NO_PID]: sqlca: code: -220, state: 08003
index 3c293b2dc702f36eb045582893eeabb48ed5eba5..c0d518ed79745fd3c07d2ca16e26a4c056a2b5ea 100644 (file)
@@ -2,5 +2,5 @@
 [NO_PID]: sqlca: code: 0, state: 00000
 [NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>  
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: raising sqlcode -220 on line 17: no such connection DEFAULT on line 17
+[NO_PID]: raising sqlcode -220 on line 17: connection "DEFAULT" does not exist on line 17
 [NO_PID]: sqlca: code: -220, state: 08003
index 8e0d385e969b039c4ca0bd087086f6c6524ef718..ea6f9e2591c71d903c25ec2b28fad2df14417f1f 100644 (file)
@@ -50,7 +50,7 @@
 [NO_PID]: sqlca: code: 0, state: 00000
 [NO_PID]: raising sqlcode -402 on line 56: could not connect to database "connectdb" on line 56
 [NO_PID]: sqlca: code: -402, state: 08001
-[NO_PID]: raising sqlcode -220 on line 57: no such connection main on line 57
+[NO_PID]: raising sqlcode -220 on line 57: connection "main" does not exist on line 57
 [NO_PID]: sqlca: code: -220, state: 08003
 [NO_PID]: ECPGconnect: opening database <DEFAULT> on <DEFAULT> port <DEFAULT>  for user connectdb
 [NO_PID]: sqlca: code: 0, state: 00000
@@ -62,5 +62,5 @@
 [NO_PID]: sqlca: code: 0, state: 00000
 [NO_PID]: ecpg_finish: connection main closed
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: raising sqlcode -220 on line 68: no such connection nonexistant on line 68
+[NO_PID]: raising sqlcode -220 on line 68: connection "nonexistant" does not exist on line 68
 [NO_PID]: sqlca: code: -220, state: 08003
index 22085a2567394a158114796471b571c4d793766f..1b6fa18d6140563a7bda5e066ab8ce591a106550 100644 (file)
@@ -1,14 +1,14 @@
 [NO_PID]: ECPGdebug: set to 1
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: raising sqlcode -220 on line 88: no such connection NULL on line 88
+[NO_PID]: raising sqlcode -220 on line 88: connection "NULL" does not exist on line 88
 [NO_PID]: sqlca: code: -220, state: 08003
-[NO_PID]: raising sqlcode -220 on line 90: no such connection NULL on line 90
+[NO_PID]: raising sqlcode -220 on line 90: connection "NULL" does not exist on line 90
 [NO_PID]: sqlca: code: -220, state: 08003
-[NO_PID]: raising sqlcode -220 on line 92: no such connection NULL on line 92
+[NO_PID]: raising sqlcode -220 on line 92: connection "NULL" does not exist on line 92
 [NO_PID]: sqlca: code: -220, state: 08003
-[NO_PID]: raising sqlcode -220 on line 94: no such connection NULL on line 94
+[NO_PID]: raising sqlcode -220 on line 94: connection "NULL" does not exist on line 94
 [NO_PID]: sqlca: code: -220, state: 08003
-[NO_PID]: raising sqlcode -220 on line 96: no such connection NULL on line 96
+[NO_PID]: raising sqlcode -220 on line 96: connection "NULL" does not exist on line 96
 [NO_PID]: sqlca: code: -220, state: 08003
-[NO_PID]: raising sqlcode -220 on line 98: no such connection NULL on line 98
+[NO_PID]: raising sqlcode -220 on line 98: connection "NULL" does not exist on line 98
 [NO_PID]: sqlca: code: -220, state: 08003
index 168dc7c50a490d176e3b7095c423300381e5a033..228b2a6066a462bf7967e1370759716c98dae029 100644 (file)
@@ -37,7 +37,7 @@ LINE 1: select * from nonexistant
 [NO_PID]: sqlca: code: 0, state: 00000
 [NO_PID]: raising sqlstate 42P01 (sqlcode -400) on line 39: relation "nonexistant" does not exist on line 39
 [NO_PID]: sqlca: code: -400, state: 42P01
-sql error: relation "nonexistant" does not exist on line 39
+SQL error: relation "nonexistant" does not exist on line 39
 [NO_PID]: ECPGtrans on line 40: action "rollback"; connection "regress1"
 [NO_PID]: sqlca: code: 0, state: 00000
 [NO_PID]: ecpg_execute on line 43: query: select * from nonexistant; with 0 parameter(s) on connection regress1
@@ -51,7 +51,7 @@ LINE 1: select * from nonexistant
 [NO_PID]: raising sqlstate 42P01 (sqlcode -400) on line 43: relation "nonexistant" does not exist on line 43
 [NO_PID]: sqlca: code: -400, state: 42P01
 Error in statement 'select':
-sql error: relation "nonexistant" does not exist on line 43
+SQL error: relation "nonexistant" does not exist on line 43
 [NO_PID]: ECPGtrans on line 44: action "rollback"; connection "regress1"
 [NO_PID]: sqlca: code: 0, state: 00000
 [NO_PID]: ecpg_execute on line 47: query: select * from nonexistant; with 0 parameter(s) on connection regress1
@@ -65,7 +65,7 @@ LINE 1: select * from nonexistant
 [NO_PID]: raising sqlstate 42P01 (sqlcode -400) on line 47: relation "nonexistant" does not exist on line 47
 [NO_PID]: sqlca: code: -400, state: 42P01
 Found another error
-sql error: relation "nonexistant" does not exist on line 47
+SQL error: relation "nonexistant" does not exist on line 47
 [NO_PID]: ECPGtrans on line 48: action "rollback"; connection "regress1"
 [NO_PID]: sqlca: code: 0, state: 00000
 [NO_PID]: ecpg_execute on line 51: query: select * from nonexistant; with 0 parameter(s) on connection regress1
index 211dd0f47ea8dd68f6b06d95e019b63a75799be0..4a9d331464d1af1bba19554f8d2a2a215595d692 100644 (file)
 [NO_PID]: sqlca: code: 0, state: 00000
 [NO_PID]: raising sqlstate 55006 (sqlcode -400) on line 53: cannot drop "my_table" because it is being used by active queries in this session on line 53
 [NO_PID]: sqlca: code: -400, state: 55006
-sql error: cannot drop "my_table" because it is being used by active queries in this session on line 53
+SQL error: cannot drop "my_table" because it is being used by active queries in this session on line 53
 [NO_PID]: ecpg_finish: connection regress1 closed
 [NO_PID]: sqlca: code: 0, state: 00000
index fd77b01b9bd6cf9881b232ef7452e487fcc632af..33227eb81caa21ae6adcf7ac1402cc744f2c3ffa 100644 (file)
@@ -28,7 +28,7 @@
 [NO_PID]: sqlca: code: 0, state: 22P06
 [NO_PID]: ecpg_execute on line 26: OK: INSERT 0 1
 [NO_PID]: sqlca: code: 0, state: 22P06
-sql error: nonstandard use of \\ in a string literal
+SQL error: nonstandard use of \\ in a string literal
 [NO_PID]: ecpg_execute on line 28: query: insert into "My_Table" values ( 1 , E'a\\\\b' ); with 0 parameter(s) on connection regress1
 [NO_PID]: sqlca: code: 0, state: 00000
 [NO_PID]: ecpg_execute on line 28: using PQexec