From 7793c6ecca0560de152ec8dc0dea22d22c5d59af Mon Sep 17 00:00:00 2001 From: Michael Meskes Date: Wed, 3 Oct 2007 11:11:12 +0000 Subject: [PATCH] Cleaned up ecpglib and renamed functions that do not need to be exported. Created export list for ecpglib. --- src/interfaces/ecpg/ChangeLog | 3 + src/interfaces/ecpg/compatlib/informix.c | 43 ++- src/interfaces/ecpg/ecpglib/Makefile | 51 ++- src/interfaces/ecpg/ecpglib/connect.c | 130 +++---- src/interfaces/ecpg/ecpglib/data.c | 62 +-- src/interfaces/ecpg/ecpglib/descriptor.c | 132 +++---- src/interfaces/ecpg/ecpglib/error.c | 28 +- src/interfaces/ecpg/ecpglib/execute.c | 360 +++++++++--------- src/interfaces/ecpg/ecpglib/exports.txt | 28 ++ src/interfaces/ecpg/ecpglib/extern.h | 71 ++-- src/interfaces/ecpg/ecpglib/memory.c | 28 +- src/interfaces/ecpg/ecpglib/misc.c | 32 +- src/interfaces/ecpg/ecpglib/prepare.c | 88 ++--- src/interfaces/ecpg/ecpglib/typename.c | 6 +- src/interfaces/ecpg/include/ecpglib.h | 5 +- src/interfaces/ecpg/preproc/preproc.y | 14 +- src/interfaces/ecpg/preproc/type.c | 4 +- src/interfaces/ecpg/preproc/type.h | 2 +- .../expected/compat_informix-rnull.stderr | 110 +++--- .../compat_informix-test_informix.stderr | 100 ++--- .../compat_informix-test_informix2.stderr | 54 +-- .../ecpg/test/expected/connect-test1.stderr | 10 +- .../ecpg/test/expected/connect-test2.stderr | 40 +- .../ecpg/test/expected/connect-test3.stderr | 18 +- .../ecpg/test/expected/connect-test5.stderr | 10 +- .../test/expected/pgtypeslib-dt_test.stderr | 34 +- .../test/expected/pgtypeslib-num_test.stderr | 22 +- .../expected/preproc-array_of_struct.stderr | 70 ++-- .../test/expected/preproc-autoprep.stderr | 92 ++--- .../ecpg/test/expected/preproc-define.stderr | 42 +- .../ecpg/test/expected/preproc-type.stderr | 34 +- .../test/expected/preproc-variable.stderr | 156 ++++---- .../test/expected/preproc-whenever.stderr | 58 +-- .../ecpg/test/expected/sql-array.stderr | 74 ++-- .../ecpg/test/expected/sql-binary.stderr | 60 +-- .../ecpg/test/expected/sql-code100.stderr | 110 +++--- .../ecpg/test/expected/sql-copystdout.stderr | 32 +- .../ecpg/test/expected/sql-define.stderr | 46 +-- .../ecpg/test/expected/sql-desc.stderr | 116 +++--- .../ecpg/test/expected/sql-dynalloc.stderr | 80 ++-- .../ecpg/test/expected/sql-dynalloc2.stderr | 84 ++-- .../ecpg/test/expected/sql-dyntest.stderr | 86 ++--- .../ecpg/test/expected/sql-execute.stderr | 130 +++---- .../ecpg/test/expected/sql-fetch.stderr | 110 +++--- .../ecpg/test/expected/sql-func.stderr | 68 ++-- .../ecpg/test/expected/sql-indicators.stderr | 74 ++-- .../ecpg/test/expected/sql-insupd.stderr | 60 +-- .../ecpg/test/expected/sql-oldexec.stderr | 130 +++---- .../ecpg/test/expected/sql-parser.stderr | 42 +- .../ecpg/test/expected/sql-quote.stderr | 102 ++--- .../ecpg/test/expected/sql-show.stderr | 56 +-- 51 files changed, 1748 insertions(+), 1649 deletions(-) create mode 100644 src/interfaces/ecpg/ecpglib/exports.txt diff --git a/src/interfaces/ecpg/ChangeLog b/src/interfaces/ecpg/ChangeLog index 106529a29f..e6eab07773 100644 --- a/src/interfaces/ecpg/ChangeLog +++ b/src/interfaces/ecpg/ChangeLog @@ -2256,5 +2256,8 @@ Tue, 02 Oct 2007 11:32:25 +0200 Wed, 03 Oct 2007 10:48:39 +0200 - Hopefully fixed some stuff that causes Windows builds to fail. + - Cleaned up ecpglib and renamed functions that do not need to be + exported. + - Created export list for ecpglib. - Set ecpg library version to 6.0. - Set ecpg version to 4.4. diff --git a/src/interfaces/ecpg/compatlib/informix.c b/src/interfaces/ecpg/compatlib/informix.c index 032ccaf89a..b1f78aebaf 100644 --- a/src/interfaces/ecpg/compatlib/informix.c +++ b/src/interfaces/ecpg/compatlib/informix.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/informix.c,v 1.49 2007/08/14 10:01:52 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/informix.c,v 1.50 2007/10/03 11:11:11 meskes Exp $ */ #include #include @@ -7,14 +7,15 @@ #include #include +#define POSTGRES_ECPG_INTERNAL #include #include #include #include #include #include - -char *ECPGalloc(long, int); +#include +#include static int deccall2(decimal *arg1, decimal *arg2, int (*ptr) (numeric *, numeric *)) @@ -667,7 +668,7 @@ static struct * initialize the struct, which holds the different forms * of the long value */ -static void +static int initValue(long lng_val) { int i, @@ -701,7 +702,8 @@ initValue(long lng_val) value.remaining = value.digits; /* convert the long to string */ - value.val_string = (char *) malloc(value.digits + 1); + if ((value.val_string = (char *) malloc(value.digits + 1)) == NULL) + return -1; dig = value.val; for (i = value.digits, j = 0; i > 0; i--, j++) { @@ -710,6 +712,7 @@ initValue(long lng_val) l /= 10; } value.val_string[value.digits] = '\0'; + return 0; } /* return the position oft the right-most dot in some string */ @@ -755,7 +758,11 @@ rfmtlong(long lng_val, char *fmt, char *outbuf) temp = (char *) malloc(fmt_len + 1); /* put all info about the long in a struct */ - initValue(lng_val); + if (!temp || initValue(lng_val) == -1) + { + errno = ENOMEM; + return -1; + } /* '<' is the only format, where we have to align left */ if (strchr(fmt, (int) '<')) @@ -991,11 +998,25 @@ ECPG_informix_set_var(int number, void *pointer, int lineno) } /* a new one has to be added */ - ptr = (struct var_list *) ECPGalloc(sizeof(struct var_list), lineno); - ptr->number = number; - ptr->pointer = pointer; - ptr->next = ivlist; - ivlist = ptr; + ptr = (struct var_list *) calloc(1L, sizeof(struct var_list)); + if (!ptr) + { + struct sqlca_t *sqlca = ECPGget_sqlca(); + + sqlca->sqlcode = ECPG_OUT_OF_MEMORY; + strncpy(sqlca->sqlstate, "YE001", sizeof("YE001")); + snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc), "Out of memory in line %d.", lineno); + sqlca->sqlerrm.sqlerrml = strlen(sqlca->sqlerrm.sqlerrmc); + /* free all memory we have allocated for the user */ + ECPGfree_auto_mem(); + } + else + { + ptr->number = number; + ptr->pointer = pointer; + ptr->next = ivlist; + ivlist = ptr; + } } void * diff --git a/src/interfaces/ecpg/ecpglib/Makefile b/src/interfaces/ecpg/ecpglib/Makefile index d95054fb32..1db8855db6 100644 --- a/src/interfaces/ecpg/ecpglib/Makefile +++ b/src/interfaces/ecpg/ecpglib/Makefile @@ -4,7 +4,7 @@ # # Copyright (c) 1994, Regents of the University of California # -# $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/Makefile,v 1.48 2007/09/27 19:53:44 tgl Exp $ +# $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/Makefile,v 1.49 2007/10/03 11:11:12 meskes Exp $ # #------------------------------------------------------------------------- @@ -31,6 +31,7 @@ OBJS= execute.o typename.o descriptor.o data.o error.o prepare.o memory.o \ # thread.c is needed only for non-WIN32 implementation of path.c ifneq ($(PORTNAME), win32) OBJS += thread.o +DLL_DEFFILE=libecpgdll.def endif SHLIB_LINK = -L../pgtypeslib -lpgtypes $(libpq) -lm $(PTHREAD_LIBS) @@ -58,6 +59,52 @@ path.o: path.c $(top_builddir)/src/port/pg_config_paths.h $(top_builddir)/src/port/pg_config_paths.h: $(MAKE) -C $(top_builddir)/src/port pg_config_paths.h +# We need several not-quite-identical variants of .DEF files to build libecpg +# DLLs for Windows. These are made from the single source file exports.txt. +# Since we can't assume that Windows boxes will have sed, the .DEF files are +# always built and included in distribution tarballs. + +.PHONY: def-files +def-files: $(srcdir)/libecpgdll.def $(srcdir)/blibecpgdll.def + +$(srcdir)/libecpgdll.def: exports.txt + echo '; DEF file for MS VC++' > $@ + echo 'LIBRARY LIBECPG' >> $@ + echo 'EXPORTS' >> $@ + sed -e '/^#/d' -e 's/^\(.* \)\([0-9][0-9]*\)/ \1@ \2/' < $< >> $@ + +$(srcdir)/blibecpgdll.def: exports.txt + echo '; DEF file for Borland C++ Builder' > $@ + echo 'LIBRARY BLIBECPG' >> $@ + echo 'EXPORTS' >> $@ + sed -e '/^#/d' -e 's/^\(.* \)\([0-9][0-9]*\)/ _\1@ \2/' < $< >> $@ + echo '' >> $@ + echo '; Aliases for MS compatible names' >> $@ + sed -e '/^#/d' -e 's/^\(.* \)\([0-9][0-9]*\)/ \1= _\1/' < $< | sed 's/ *$$//' >> $@ + +# Where possible, restrict the symbols exported by the library to just the +# official list, so as to avoid unintentional ABI changes. + +ifeq ($(PORTNAME), darwin) +$(shlib): exports.list + +exports.list: exports.txt + $(AWK) '/^[^#]/ {printf "_%s\n",$$1}' $< >$@ + +exported_symbols_list = -exported_symbols_list exports.list +endif + +ifeq ($(PORTNAME), linux) +$(shlib): exports.list + +exports.list: exports.txt + echo '{ global:' >$@ + $(AWK) '/^[^#]/ {printf "%s;\n",$$1}' $< >>$@ + echo ' local: *; };' >>$@ + +exported_symbols_list = -Wl,--version-script=exports.list +endif + install: all installdirs install-lib installdirs: @@ -66,4 +113,4 @@ installdirs: uninstall: uninstall-lib clean distclean maintainer-clean: clean-lib - rm -f $(OBJS) path.c snprintf.c strlcpy.c thread.c + rm -f $(OBJS) path.c snprintf.c strlcpy.c thread.c exports.list diff --git a/src/interfaces/ecpg/ecpglib/connect.c b/src/interfaces/ecpg/ecpglib/connect.c index 235aa936c6..efc0fe618c 100644 --- a/src/interfaces/ecpg/ecpglib/connect.c +++ b/src/interfaces/ecpg/ecpglib/connect.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.46 2007/10/03 08:55:22 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.47 2007/10/03 11:11:12 meskes Exp $ */ #define POSTGRES_ECPG_INTERNAL #include "postgres_fe.h" @@ -71,7 +71,7 @@ ecpg_get_connection_nr(const char *connection_name) } struct connection * -ECPGget_connection(const char *connection_name) +ecpg_get_connection(const char *connection_name) { struct connection *ret = NULL; @@ -117,7 +117,7 @@ ecpg_finish(struct connection * act) struct ECPGtype_information_cache *cache, *ptr; - ECPGdeallocate_all_conn(0, ECPG_COMPAT_PGSQL, act); + ecpg_deallocate_all_conn(0, ECPG_COMPAT_PGSQL, act); PQfinish(act->connection); /* @@ -144,33 +144,33 @@ ecpg_finish(struct connection * act) if (actual_connection == act) actual_connection = all_connections; - ECPGlog("ecpg_finish: Connection %s closed.\n", act->name); + ecpg_log("ecpg_finish: Connection %s closed.\n", act->name); - for (cache = act->cache_head; cache; ptr = cache, cache = cache->next, ECPGfree(ptr)); - ECPGfree(act->name); - ECPGfree(act); + for (cache = act->cache_head; cache; ptr = cache, cache = cache->next, ecpg_free(ptr)); + ecpg_free(act->name); + ecpg_free(act); } else - ECPGlog("ecpg_finish: called an extra time.\n"); + ecpg_log("ecpg_finish: called an extra time.\n"); } bool ECPGsetcommit(int lineno, const char *mode, const char *connection_name) { - struct connection *con = ECPGget_connection(connection_name); + struct connection *con = ecpg_get_connection(connection_name); PGresult *results; - if (!ECPGinit(con, connection_name, lineno)) + if (!ecpg_init(con, connection_name, lineno)) return (false); - ECPGlog("ECPGsetcommit line %d action = %s connection = %s\n", lineno, mode, con->name); + ecpg_log("ECPGsetcommit line %d action = %s connection = %s\n", lineno, mode, con->name); if (con->autocommit == true && strncmp(mode, "off", strlen("off")) == 0) { if (con->committed) { results = PQexec(con->connection, "begin transaction"); - if (!ECPGcheck_PQresult(results, lineno, con->connection, ECPG_COMPAT_PGSQL)) + if (!ecpg_check_PQresult(results, lineno, con->connection, ECPG_COMPAT_PGSQL)) return false; PQclear(results); con->committed = false; @@ -182,7 +182,7 @@ ECPGsetcommit(int lineno, const char *mode, const char *connection_name) if (!con->committed) { results = PQexec(con->connection, "commit"); - if (!ECPGcheck_PQresult(results, lineno, con->connection, ECPG_COMPAT_PGSQL)) + if (!ecpg_check_PQresult(results, lineno, con->connection, ECPG_COMPAT_PGSQL)) return false; PQclear(results); con->committed = true; @@ -196,9 +196,9 @@ ECPGsetcommit(int lineno, const char *mode, const char *connection_name) bool ECPGsetconn(int lineno, const char *connection_name) { - struct connection *con = ECPGget_connection(connection_name); + struct connection *con = ecpg_get_connection(connection_name); - if (!ECPGinit(con, connection_name, lineno)) + if (!ecpg_init(con, connection_name, lineno)) return (false); #ifdef ENABLE_THREAD_SAFETY @@ -229,7 +229,7 @@ ECPGnoticeReceiver(void *arg, const PGresult *result) if (strncmp(sqlstate, "00", 2) == 0) return; - ECPGlog("ECPGnoticeReceiver %s\n", message); + ecpg_log("ECPGnoticeReceiver %s\n", message); /* map to SQLCODE for backward compatibility */ if (strcmp(sqlstate, ECPG_SQLSTATE_INVALID_CURSOR_NAME) == 0) @@ -252,7 +252,7 @@ ECPGnoticeReceiver(void *arg, const PGresult *result) sqlca->sqlerrm.sqlerrmc[sizeof(sqlca->sqlerrm.sqlerrmc) - 1] = 0; sqlca->sqlerrm.sqlerrml = strlen(sqlca->sqlerrm.sqlerrmc); - ECPGlog("raising sqlcode %d\n", sqlcode); + ecpg_log("raising sqlcode %d\n", sqlcode); } @@ -263,17 +263,17 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p struct sqlca_t *sqlca = ECPGget_sqlca(); enum COMPAT_MODE compat = c; struct connection *this; - char *dbname = name ? ECPGstrdup(name, lineno) : NULL, + char *dbname = name ? ecpg_strdup(name, lineno) : NULL, *host = NULL, *tmp, *port = NULL, *realname = NULL, *options = NULL; - ECPGinit_sqlca(sqlca); + ecpg_init_sqlca(sqlca); /* clear auto_mem structure because some error handling functions might access it */ - ECPGclear_auto_mem(); + ecpg_clear_auto_mem(); if (INFORMIX_MODE(compat)) { @@ -287,8 +287,8 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p envname = getenv("PG_DBPATH"); if (envname) { - ECPGfree(dbname); - dbname = ECPGstrdup(envname, lineno); + ecpg_free(dbname); + dbname = ecpg_strdup(envname, lineno); } } @@ -301,15 +301,15 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p #endif /* check if the identifier is unique */ - if (ECPGget_connection(connection_name)) + if (ecpg_get_connection(connection_name)) { - ECPGfree(dbname); - ECPGlog("connect: connection identifier %s is already in use\n", + ecpg_free(dbname); + ecpg_log("ECPGconnect: connection identifier %s is already in use\n", connection_name); return false; } - if ((this = (struct connection *) ECPGalloc(sizeof(struct connection), lineno)) == NULL) + if ((this = (struct connection *) ecpg_alloc(sizeof(struct connection), lineno)) == NULL) return false; if (dbname != NULL) @@ -341,14 +341,14 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p tmp = strrchr(dbname + offset, '?'); if (tmp != NULL) /* options given */ { - options = ECPGstrdup(tmp + 1, lineno); + options = ecpg_strdup(tmp + 1, lineno); *tmp = '\0'; } tmp = last_dir_separator(dbname + offset); if (tmp != NULL) /* database name given */ { - realname = ECPGstrdup(tmp + 1, lineno); + realname = ecpg_strdup(tmp + 1, lineno); *tmp = '\0'; } @@ -361,53 +361,53 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p if ((tmp2 = strchr(tmp + 1, ':')) != NULL) { *tmp2 = '\0'; - host = ECPGstrdup(tmp + 1, lineno); + host = ecpg_strdup(tmp + 1, lineno); if (strncmp(dbname, "unix:", 5) != 0) { - ECPGlog("connect: socketname %s given for TCP connection in line %d\n", host, lineno); - ECPGraise(lineno, ECPG_CONNECT, ECPG_SQLSTATE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION, realname ? realname : ""); + ecpg_log("ECPGconnect: socketname %s given for TCP connection in line %d\n", host, lineno); + ecpg_raise(lineno, ECPG_CONNECT, ECPG_SQLSTATE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION, realname ? realname : ""); if (host) - ECPGfree(host); + ecpg_free(host); /* - * port not set yet if (port) ECPGfree(port); + * port not set yet if (port) ecpg_free(port); */ if (options) - ECPGfree(options); + ecpg_free(options); if (realname) - ECPGfree(realname); + ecpg_free(realname); if (dbname) - ECPGfree(dbname); + ecpg_free(dbname); free(this); return false; } } else - port = ECPGstrdup(tmp + 1, lineno); + port = ecpg_strdup(tmp + 1, lineno); } if (strncmp(dbname, "unix:", 5) == 0) { if (strcmp(dbname + offset, "localhost") != 0 && strcmp(dbname + offset, "127.0.0.1") != 0) { - ECPGlog("connect: non-localhost access via sockets in line %d\n", lineno); - ECPGraise(lineno, ECPG_CONNECT, ECPG_SQLSTATE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION, realname ? realname : ""); + ecpg_log("ECPGconnect: non-localhost access via sockets in line %d\n", lineno); + ecpg_raise(lineno, ECPG_CONNECT, ECPG_SQLSTATE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION, realname ? realname : ""); if (host) - ECPGfree(host); + ecpg_free(host); if (port) - ECPGfree(port); + ecpg_free(port); if (options) - ECPGfree(options); + ecpg_free(options); if (realname) - ECPGfree(realname); + ecpg_free(realname); if (dbname) - ECPGfree(dbname); + ecpg_free(dbname); free(this); return false; } } else - host = ECPGstrdup(dbname + offset, lineno); + host = ecpg_strdup(dbname + offset, lineno); } } @@ -417,18 +417,18 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p tmp = strrchr(dbname, ':'); if (tmp != NULL) /* port number given */ { - port = ECPGstrdup(tmp + 1, lineno); + port = ecpg_strdup(tmp + 1, lineno); *tmp = '\0'; } tmp = strrchr(dbname, '@'); if (tmp != NULL) /* host name given */ { - host = ECPGstrdup(tmp + 1, lineno); + host = ecpg_strdup(tmp + 1, lineno); *tmp = '\0'; } - realname = (strlen(dbname) > 0) ? ECPGstrdup(dbname, lineno) : NULL; + realname = (strlen(dbname) > 0) ? ecpg_strdup(dbname, lineno) : NULL; } } else @@ -439,9 +439,9 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p pthread_mutex_lock(&connections_mutex); #endif if (connection_name != NULL) - this->name = ECPGstrdup(connection_name, lineno); + this->name = ecpg_strdup(connection_name, lineno); else - this->name = ECPGstrdup(realname, lineno); + this->name = ecpg_strdup(realname, lineno); this->cache_head = NULL; this->prep_stmts = NULL; @@ -457,7 +457,7 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p #endif actual_connection = all_connections; - ECPGlog("ECPGconnect: opening database %s on %s port %s %s%s%s%s\n", + ecpg_log("ECPGconnect: opening database %s on %s port %s %s%s%s%s\n", realname ? realname : "", host ? host : "", port ? (ecpg_internal_regression_mode ? "" : port) : "", @@ -471,7 +471,7 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p const char *errmsg = PQerrorMessage(this->connection); const char *db = realname ? realname : ""; - ECPGlog("connect: could not open database %s on %s port %s %s%s%s%s in line %d\n\t%s\n", + ecpg_log("ECPGconnect: could not open database %s on %s port %s %s%s%s%s in line %d\n\t%s\n", db, host ? host : "", port ? (ecpg_internal_regression_mode ? "" : port) : "", @@ -484,17 +484,17 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p pthread_mutex_unlock(&connections_mutex); #endif - ECPGraise(lineno, ECPG_CONNECT, ECPG_SQLSTATE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION, db); + ecpg_raise(lineno, ECPG_CONNECT, ECPG_SQLSTATE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION, db); if (host) - ECPGfree(host); + ecpg_free(host); if (port) - ECPGfree(port); + ecpg_free(port); if (options) - ECPGfree(options); + ecpg_free(options); if (realname) - ECPGfree(realname); + ecpg_free(realname); if (dbname) - ECPGfree(dbname); + ecpg_free(dbname); return false; } #ifdef ENABLE_THREAD_SAFETY @@ -502,15 +502,15 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p #endif if (host) - ECPGfree(host); + ecpg_free(host); if (port) - ECPGfree(port); + ecpg_free(port); if (options) - ECPGfree(options); + ecpg_free(options); if (realname) - ECPGfree(realname); + ecpg_free(realname); if (dbname) - ECPGfree(dbname); + ecpg_free(dbname); this->committed = true; this->autocommit = autocommit; @@ -532,7 +532,7 @@ ECPGdisconnect(int lineno, const char *connection_name) if (strcmp(connection_name, "ALL") == 0) { - ECPGinit_sqlca(sqlca); + ecpg_init_sqlca(sqlca); for (con = all_connections; con;) { struct connection *f = con; @@ -545,7 +545,7 @@ ECPGdisconnect(int lineno, const char *connection_name) { con = ecpg_get_connection_nr(connection_name); - if (!ECPGinit(con, connection_name, lineno)) + if (!ecpg_init(con, connection_name, lineno)) { #ifdef ENABLE_THREAD_SAFETY pthread_mutex_unlock(&connections_mutex); diff --git a/src/interfaces/ecpg/ecpglib/data.c b/src/interfaces/ecpg/ecpglib/data.c index 949e86f559..07282ffbe2 100644 --- a/src/interfaces/ecpg/ecpglib/data.c +++ b/src/interfaces/ecpg/ecpglib/data.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/data.c,v 1.38 2007/05/10 14:29:21 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/data.c,v 1.39 2007/10/03 11:11:12 meskes Exp $ */ #define POSTGRES_ECPG_INTERNAL #include "postgres_fe.h" @@ -39,7 +39,7 @@ garbage_left(enum ARRAY_TYPE isarray, char *scan_length, enum COMPAT_MODE compat } bool -ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno, +ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno, enum ECPGttype type, enum ECPGttype ind_type, char *var, char *ind, long varcharsize, long offset, long ind_offset, enum ARRAY_TYPE isarray, enum COMPAT_MODE compat, bool force_indicator) @@ -60,7 +60,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno, else log_offset = offset; - ECPGlog("ECPGget_data 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 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 */ @@ -104,7 +104,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno, } else { - ECPGraise(lineno, ECPG_MISSING_INDICATOR, + ecpg_raise(lineno, ECPG_MISSING_INDICATOR, ECPG_SQLSTATE_NULL_VALUE_NO_INDICATOR_PARAMETER, NULL); return (false); @@ -112,9 +112,9 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno, } break; default: - ECPGraise(lineno, ECPG_UNSUPPORTED, + ecpg_raise(lineno, ECPG_UNSUPPORTED, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, - ECPGtype_name(ind_type)); + ecpg_type_name(ind_type)); return (false); break; } @@ -128,7 +128,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno, { if (!pval || *pval != '{') { - ECPGraise(lineno, ECPG_DATA_NOT_ARRAY, + ecpg_raise(lineno, ECPG_DATA_NOT_ARRAY, ECPG_SQLSTATE_DATATYPE_MISMATCH, NULL); return (false); } @@ -213,7 +213,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno, res = strtol(pval, &scan_length, 10); if (garbage_left(isarray, scan_length, compat)) { - ECPGraise(lineno, ECPG_INT_FORMAT, + ecpg_raise(lineno, ECPG_INT_FORMAT, ECPG_SQLSTATE_DATATYPE_MISMATCH, pval); return (false); } @@ -247,7 +247,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno, ures = strtoul(pval, &scan_length, 10); if (garbage_left(isarray, scan_length, compat)) { - ECPGraise(lineno, ECPG_UINT_FORMAT, + ecpg_raise(lineno, ECPG_UINT_FORMAT, ECPG_SQLSTATE_DATATYPE_MISMATCH, pval); return (false); } @@ -281,7 +281,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno, *((long long int *) (var + offset * act_tuple)) = strtoll(pval, &scan_length, 10); if (garbage_left(isarray, scan_length, compat)) { - ECPGraise(lineno, ECPG_INT_FORMAT, ECPG_SQLSTATE_DATATYPE_MISMATCH, pval); + ecpg_raise(lineno, ECPG_INT_FORMAT, ECPG_SQLSTATE_DATATYPE_MISMATCH, pval); return (false); } pval = scan_length; @@ -299,7 +299,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno, if ((isarray && *scan_length != ',' && *scan_length != '}') || (!isarray && !(INFORMIX_MODE(compat) && *scan_length == '.') && *scan_length != '\0' && *scan_length != ' ')) /* Garbage left */ { - ECPGraise(lineno, ECPG_UINT_FORMAT, ECPG_SQLSTATE_DATATYPE_MISMATCH, pval); + ecpg_raise(lineno, ECPG_UINT_FORMAT, ECPG_SQLSTATE_DATATYPE_MISMATCH, pval); return (false); } pval = scan_length; @@ -325,7 +325,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno, if (garbage_left(isarray, scan_length, compat)) { - ECPGraise(lineno, ECPG_FLOAT_FORMAT, + ecpg_raise(lineno, ECPG_FLOAT_FORMAT, ECPG_SQLSTATE_DATATYPE_MISMATCH, pval); return (false); } @@ -358,7 +358,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno, else if (offset == sizeof(int)) *((int *) (var + offset * act_tuple)) = false; else - ECPGraise(lineno, ECPG_CONVERT_BOOL, + ecpg_raise(lineno, ECPG_CONVERT_BOOL, ECPG_SQLSTATE_DATATYPE_MISMATCH, "different size"); break; @@ -370,7 +370,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno, else if (offset == sizeof(int)) *((int *) (var + offset * act_tuple)) = true; else - ECPGraise(lineno, ECPG_CONVERT_BOOL, + ecpg_raise(lineno, ECPG_CONVERT_BOOL, ECPG_SQLSTATE_DATATYPE_MISMATCH, "different size"); break; @@ -382,7 +382,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno, } } - ECPGraise(lineno, ECPG_CONVERT_BOOL, + ecpg_raise(lineno, ECPG_CONVERT_BOOL, ECPG_SQLSTATE_DATATYPE_MISMATCH, pval); return (false); break; @@ -490,7 +490,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno, /* did we get an error? */ if (nres == NULL) { - ECPGlog("ECPGget_data line %d: RESULT: %s errno %d\n", + ecpg_log("ecpg_get_data line %d: RESULT: %s errno %d\n", lineno, pval ? pval : "", errno); if (INFORMIX_MODE(compat)) @@ -504,14 +504,14 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno, ECPGset_noind_null(ECPGt_numeric, nres); else { - ECPGraise(lineno, ECPG_OUT_OF_MEMORY, + ecpg_raise(lineno, ECPG_OUT_OF_MEMORY, ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL); return (false); } } else { - ECPGraise(lineno, ECPG_NUMERIC_FORMAT, + ecpg_raise(lineno, ECPG_NUMERIC_FORMAT, ECPG_SQLSTATE_DATATYPE_MISMATCH, pval); return (false); } @@ -524,7 +524,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno, if (garbage_left(isarray, scan_length, compat)) { free(nres); - ECPGraise(lineno, ECPG_NUMERIC_FORMAT, + ecpg_raise(lineno, ECPG_NUMERIC_FORMAT, ECPG_SQLSTATE_DATATYPE_MISMATCH, pval); return (false); } @@ -553,7 +553,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno, /* did we get an error? */ if (ires == NULL) { - ECPGlog("ECPGget_data line %d: RESULT: %s errno %d\n", + ecpg_log("ecpg_get_data line %d: RESULT: %s errno %d\n", lineno, pval ? pval : "", errno); if (INFORMIX_MODE(compat)) @@ -562,7 +562,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno, * Informix wants its own NULL value here * instead of an error */ - ires = (interval *) ECPGalloc(sizeof(interval), lineno); + ires = (interval *) ecpg_alloc(sizeof(interval), lineno); if (!ires) return (false); @@ -570,7 +570,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno, } else { - ECPGraise(lineno, ECPG_INTERVAL_FORMAT, + ecpg_raise(lineno, ECPG_INTERVAL_FORMAT, ECPG_SQLSTATE_DATATYPE_MISMATCH, pval); return (false); } @@ -583,7 +583,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno, if (garbage_left(isarray, scan_length, compat)) { free(ires); - ECPGraise(lineno, ECPG_INTERVAL_FORMAT, + ecpg_raise(lineno, ECPG_INTERVAL_FORMAT, ECPG_SQLSTATE_DATATYPE_MISMATCH, pval); return (false); } @@ -607,7 +607,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno, /* did we get an error? */ if (errno != 0) { - ECPGlog("ECPGget_data line %d: RESULT: %s errno %d\n", + ecpg_log("ecpg_get_data line %d: RESULT: %s errno %d\n", lineno, pval ? pval : "", errno); if (INFORMIX_MODE(compat)) @@ -620,7 +620,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno, } else { - ECPGraise(lineno, ECPG_DATE_FORMAT, + ecpg_raise(lineno, ECPG_DATE_FORMAT, ECPG_SQLSTATE_DATATYPE_MISMATCH, pval); return (false); } @@ -632,7 +632,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno, if (garbage_left(isarray, scan_length, compat)) { - ECPGraise(lineno, ECPG_DATE_FORMAT, + ecpg_raise(lineno, ECPG_DATE_FORMAT, ECPG_SQLSTATE_DATATYPE_MISMATCH, pval); return (false); } @@ -654,7 +654,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno, /* did we get an error? */ if (errno != 0) { - ECPGlog("ECPGget_data line %d: RESULT: %s errno %d\n", + ecpg_log("ecpg_get_data line %d: RESULT: %s errno %d\n", lineno, pval ? pval : "", errno); if (INFORMIX_MODE(compat)) @@ -667,7 +667,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno, } else { - ECPGraise(lineno, ECPG_TIMESTAMP_FORMAT, + ecpg_raise(lineno, ECPG_TIMESTAMP_FORMAT, ECPG_SQLSTATE_DATATYPE_MISMATCH, pval); return (false); } @@ -679,7 +679,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno, if (garbage_left(isarray, scan_length, compat)) { - ECPGraise(lineno, ECPG_TIMESTAMP_FORMAT, + ecpg_raise(lineno, ECPG_TIMESTAMP_FORMAT, ECPG_SQLSTATE_DATATYPE_MISMATCH, pval); return (false); } @@ -691,9 +691,9 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno, break; default: - ECPGraise(lineno, ECPG_UNSUPPORTED, + ecpg_raise(lineno, ECPG_UNSUPPORTED, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, - ECPGtype_name(type)); + ecpg_type_name(type)); return (false); break; } diff --git a/src/interfaces/ecpg/ecpglib/descriptor.c b/src/interfaces/ecpg/ecpglib/descriptor.c index ce02ad3e87..be5d78ddb6 100644 --- a/src/interfaces/ecpg/ecpglib/descriptor.c +++ b/src/interfaces/ecpg/ecpglib/descriptor.c @@ -1,6 +1,6 @@ /* dynamic SQL support routines * - * $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/descriptor.c,v 1.25 2007/10/03 08:55:22 meskes Exp $ + * $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/descriptor.c,v 1.26 2007/10/03 11:11:12 meskes Exp $ */ #define POSTGRES_ECPG_INTERNAL @@ -56,16 +56,16 @@ static struct descriptor *all_descriptors = NULL; /* old internal convenience function that might go away later */ static PGresult * -ECPGresultByDescriptor(int line, const char *name) +ecpg_result_by_descriptor(int line, const char *name) { - struct descriptor *desc = ECPGfind_desc(line, name); + struct descriptor *desc = ecpg_find_desc(line, name); if (desc == NULL) return NULL; return desc->result; } static unsigned int -ECPGDynamicType_DDT(Oid type) +ecpg_dynamic_type_DDT(Oid type) { switch (type) { @@ -90,14 +90,14 @@ ECPGget_desc_header(int lineno, const char *desc_name, int *count) PGresult *ECPGresult; struct sqlca_t *sqlca = ECPGget_sqlca(); - ECPGinit_sqlca(sqlca); - ECPGresult = ECPGresultByDescriptor(lineno, desc_name); + ecpg_init_sqlca(sqlca); + ECPGresult = ecpg_result_by_descriptor(lineno, desc_name); if (!ECPGresult) return false; *count = PQnfields(ECPGresult); sqlca->sqlerrd[2] = 1; - ECPGlog("ECPGget_desc_header: found %d attributes.\n", *count); + ecpg_log("ECPGget_desc_header: found %d attributes.\n", *count); return true; } @@ -139,7 +139,7 @@ get_int_item(int lineno, void *var, enum ECPGttype vartype, int value) *(double *) var = (double) value; break; default: - ECPGraise(lineno, ECPG_VAR_NOT_NUMERIC, ECPG_SQLSTATE_RESTRICTED_DATA_TYPE_ATTRIBUTE_VIOLATION, NULL); + ecpg_raise(lineno, ECPG_VAR_NOT_NUMERIC, ECPG_SQLSTATE_RESTRICTED_DATA_TYPE_ATTRIBUTE_VIOLATION, NULL); return (false); } @@ -184,7 +184,7 @@ set_int_item(int lineno, int *target, const void *var, enum ECPGttype vartype) *target = *(double *) var; break; default: - ECPGraise(lineno, ECPG_VAR_NOT_NUMERIC, ECPG_SQLSTATE_RESTRICTED_DATA_TYPE_ATTRIBUTE_VIOLATION, NULL); + ecpg_raise(lineno, ECPG_VAR_NOT_NUMERIC, ECPG_SQLSTATE_RESTRICTED_DATA_TYPE_ATTRIBUTE_VIOLATION, NULL); return (false); } @@ -216,7 +216,7 @@ get_char_item(int lineno, void *var, enum ECPGttype vartype, char *value, int va } break; default: - ECPGraise(lineno, ECPG_VAR_NOT_CHAR, ECPG_SQLSTATE_RESTRICTED_DATA_TYPE_ATTRIBUTE_VIOLATION, NULL); + ecpg_raise(lineno, ECPG_VAR_NOT_CHAR, ECPG_SQLSTATE_RESTRICTED_DATA_TYPE_ATTRIBUTE_VIOLATION, NULL); return (false); } @@ -235,25 +235,25 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...) struct sqlca_t *sqlca = ECPGget_sqlca(); va_start(args, index); - ECPGinit_sqlca(sqlca); - ECPGresult = ECPGresultByDescriptor(lineno, desc_name); + ecpg_init_sqlca(sqlca); + ECPGresult = ecpg_result_by_descriptor(lineno, desc_name); if (!ECPGresult) return (false); ntuples = PQntuples(ECPGresult); if (ntuples < 1) { - ECPGraise(lineno, ECPG_NOT_FOUND, ECPG_SQLSTATE_NO_DATA, NULL); + ecpg_raise(lineno, ECPG_NOT_FOUND, ECPG_SQLSTATE_NO_DATA, NULL); return (false); } if (index < 1 || index > PQnfields(ECPGresult)) { - ECPGraise(lineno, ECPG_INVALID_DESCRIPTOR_INDEX, ECPG_SQLSTATE_INVALID_DESCRIPTOR_INDEX, NULL); + ecpg_raise(lineno, ECPG_INVALID_DESCRIPTOR_INDEX, ECPG_SQLSTATE_INVALID_DESCRIPTOR_INDEX, NULL); return (false); } - ECPGlog("ECPGget_desc: reading items for tuple %d\n", index); + ecpg_log("ECPGget_desc: reading items for tuple %d\n", index); --index; type = va_arg(args, enum ECPGdtype); @@ -307,7 +307,7 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...) if (!get_char_item(lineno, var, vartype, PQfname(ECPGresult, index), varcharsize)) return (false); - ECPGlog("ECPGget_desc: NAME = %s\n", PQfname(ECPGresult, index)); + ecpg_log("ECPGget_desc: NAME = %s\n", PQfname(ECPGresult, index)); break; case ECPGd_nullable: @@ -326,49 +326,49 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...) if (!get_int_item(lineno, var, vartype, (PQfmod(ECPGresult, index) - VARHDRSZ) & 0xffff)) return (false); - ECPGlog("ECPGget_desc: SCALE = %d\n", (PQfmod(ECPGresult, index) - VARHDRSZ) & 0xffff); + ecpg_log("ECPGget_desc: SCALE = %d\n", (PQfmod(ECPGresult, index) - VARHDRSZ) & 0xffff); break; case ECPGd_precision: if (!get_int_item(lineno, var, vartype, PQfmod(ECPGresult, index) >> 16)) return (false); - ECPGlog("ECPGget_desc: PRECISION = %d\n", PQfmod(ECPGresult, index) >> 16); + ecpg_log("ECPGget_desc: PRECISION = %d\n", PQfmod(ECPGresult, index) >> 16); break; case ECPGd_octet: if (!get_int_item(lineno, var, vartype, PQfsize(ECPGresult, index))) return (false); - ECPGlog("ECPGget_desc: OCTET_LENGTH = %d\n", PQfsize(ECPGresult, index)); + ecpg_log("ECPGget_desc: OCTET_LENGTH = %d\n", PQfsize(ECPGresult, index)); break; case ECPGd_length: if (!get_int_item(lineno, var, vartype, PQfmod(ECPGresult, index) - VARHDRSZ)) return (false); - ECPGlog("ECPGget_desc: LENGTH = %d\n", PQfmod(ECPGresult, index) - VARHDRSZ); + ecpg_log("ECPGget_desc: LENGTH = %d\n", PQfmod(ECPGresult, index) - VARHDRSZ); break; case ECPGd_type: - if (!get_int_item(lineno, var, vartype, ECPGDynamicType(PQftype(ECPGresult, index)))) + if (!get_int_item(lineno, var, vartype, ecpg_dynamic_type(PQftype(ECPGresult, index)))) return (false); - ECPGlog("ECPGget_desc: TYPE = %d\n", ECPGDynamicType(PQftype(ECPGresult, index))); + ecpg_log("ECPGget_desc: TYPE = %d\n", ecpg_dynamic_type(PQftype(ECPGresult, index))); break; case ECPGd_di_code: - if (!get_int_item(lineno, var, vartype, ECPGDynamicType_DDT(PQftype(ECPGresult, index)))) + if (!get_int_item(lineno, var, vartype, ecpg_dynamic_type_DDT(PQftype(ECPGresult, index)))) return (false); - ECPGlog("ECPGget_desc: TYPE = %d\n", ECPGDynamicType_DDT(PQftype(ECPGresult, index))); + ecpg_log("ECPGget_desc: TYPE = %d\n", ecpg_dynamic_type_DDT(PQftype(ECPGresult, index))); break; case ECPGd_cardinality: if (!get_int_item(lineno, var, vartype, PQntuples(ECPGresult))) return (false); - ECPGlog("ECPGget_desc: CARDINALITY = %d\n", PQntuples(ECPGresult)); + ecpg_log("ECPGget_desc: CARDINALITY = %d\n", PQntuples(ECPGresult)); break; case ECPGd_ret_length: @@ -379,20 +379,20 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...) */ if (arrsize > 0 && ntuples > arrsize) { - ECPGlog("ECPGget_desc line %d: Incorrect number of matches: %d don't fit into array of %d\n", + ecpg_log("ECPGget_desc line %d: Incorrect number of matches: %d don't fit into array of %d\n", lineno, ntuples, arrsize); - ECPGraise(lineno, ECPG_TOO_MANY_MATCHES, ECPG_SQLSTATE_CARDINALITY_VIOLATION, NULL); + ecpg_raise(lineno, ECPG_TOO_MANY_MATCHES, ECPG_SQLSTATE_CARDINALITY_VIOLATION, NULL); return false; } /* allocate storage if needed */ if (arrsize == 0 && *(void **) var == NULL) { - void *mem = (void *) ECPGalloc(offset * ntuples, lineno); + void *mem = (void *) ecpg_alloc(offset * ntuples, lineno); if (!mem) return false; *(void **) var = mem; - ECPGadd_mem(mem, lineno); + ecpg_add_mem(mem, lineno); var = mem; } @@ -401,13 +401,13 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...) if (!get_int_item(lineno, var, vartype, PQgetlength(ECPGresult, act_tuple, index))) return (false); var = (char *) var + offset; - ECPGlog("ECPGget_desc: RETURNED[%d] = %d\n", act_tuple, PQgetlength(ECPGresult, act_tuple, index)); + ecpg_log("ECPGget_desc: RETURNED[%d] = %d\n", act_tuple, PQgetlength(ECPGresult, act_tuple, index)); } break; default: snprintf(type_str, sizeof(type_str), "%d", type); - ECPGraise(lineno, ECPG_UNKNOWN_DESCRIPTOR_ITEM, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, type_str); + ecpg_raise(lineno, ECPG_UNKNOWN_DESCRIPTOR_ITEM, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, type_str); return (false); } @@ -421,18 +421,18 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...) /* Make sure we do NOT honor the locale for numeric input */ /* since the database gives the standard decimal point */ - oldlocale = ECPGstrdup(setlocale(LC_NUMERIC, NULL), lineno); + oldlocale = ecpg_strdup(setlocale(LC_NUMERIC, NULL), lineno); setlocale(LC_NUMERIC, "C"); memset(&stmt, 0, sizeof stmt); stmt.lineno = lineno; /* desparate try to guess something sensible */ - stmt.connection = ECPGget_connection(NULL); - ECPGstore_result(ECPGresult, index, &stmt, &data_var); + stmt.connection = ecpg_get_connection(NULL); + ecpg_store_result(ECPGresult, index, &stmt, &data_var); setlocale(LC_NUMERIC, oldlocale); - ECPGfree(oldlocale); + ecpg_free(oldlocale); } else if (data_var.ind_type != ECPGt_NO_INDICATOR && data_var.ind_pointer != NULL) @@ -448,21 +448,21 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...) */ if (data_var.ind_arrsize > 0 && ntuples > data_var.ind_arrsize) { - ECPGlog("ECPGget_desc line %d: Incorrect number of matches (indicator): %d don't fit into array of %d\n", + ecpg_log("ECPGget_desc line %d: Incorrect number of matches (indicator): %d don't fit into array of %d\n", lineno, ntuples, data_var.ind_arrsize); - ECPGraise(lineno, ECPG_TOO_MANY_MATCHES, ECPG_SQLSTATE_CARDINALITY_VIOLATION, NULL); + ecpg_raise(lineno, ECPG_TOO_MANY_MATCHES, ECPG_SQLSTATE_CARDINALITY_VIOLATION, NULL); return false; } /* allocate storage if needed */ if (data_var.ind_arrsize == 0 && data_var.ind_value == NULL) { - void *mem = (void *) ECPGalloc(data_var.ind_offset * ntuples, lineno); + void *mem = (void *) ecpg_alloc(data_var.ind_offset * ntuples, lineno); if (!mem) return false; *(void **) data_var.ind_pointer = mem; - ECPGadd_mem(mem, lineno); + ecpg_add_mem(mem, lineno); data_var.ind_value = mem; } @@ -471,7 +471,7 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...) if (!get_int_item(lineno, data_var.ind_value, data_var.ind_type, -PQgetisnull(ECPGresult, act_tuple, index))) return (false); data_var.ind_value = (char *) data_var.ind_value + data_var.ind_offset; - ECPGlog("ECPGget_desc: INDICATOR[%d] = %d\n", act_tuple, -PQgetisnull(ECPGresult, act_tuple, index)); + ecpg_log("ECPGget_desc: INDICATOR[%d] = %d\n", act_tuple, -PQgetisnull(ECPGresult, act_tuple, index)); } } sqlca->sqlerrd[2] = ntuples; @@ -481,7 +481,7 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...) bool ECPGset_desc_header(int lineno, const char *desc_name, int count) { - struct descriptor *desc = ECPGfind_desc(lineno, desc_name); + struct descriptor *desc = ecpg_find_desc(lineno, desc_name); if (desc == NULL) return false; desc->count = count; @@ -496,7 +496,7 @@ ECPGset_desc(int lineno, const char *desc_name, int index,...) struct descriptor_item *desc_item; struct variable *var; - desc = ECPGfind_desc(lineno, desc_name); + desc = ecpg_find_desc(lineno, desc_name); if (desc == NULL) return false; @@ -508,7 +508,7 @@ ECPGset_desc(int lineno, const char *desc_name, int index,...) if (desc_item == NULL) { - desc_item = (struct descriptor_item *) ECPGalloc(sizeof(*desc_item), lineno); + desc_item = (struct descriptor_item *) ecpg_alloc(sizeof(*desc_item), lineno); if (!desc_item) return false; desc_item->num = index; @@ -518,7 +518,7 @@ ECPGset_desc(int lineno, const char *desc_name, int index,...) desc->items = desc_item; } - if (!(var = (struct variable *) ECPGalloc(sizeof(struct variable), lineno))) + if (!(var = (struct variable *) ecpg_alloc(sizeof(struct variable), lineno))) return false; va_start(args, index); @@ -560,13 +560,13 @@ ECPGset_desc(int lineno, const char *desc_name, int index,...) { case ECPGd_data: { - if (!ECPGstore_input(lineno, true, var, &tobeinserted, false)) + if (!ecpg_store_input(lineno, true, var, &tobeinserted, false)) { - ECPGfree(var); + ecpg_free(var); return false; } - ECPGfree(desc_item->data); /* free() takes care of a potential NULL value */ + ecpg_free(desc_item->data); /* free() takes care of a potential NULL value */ desc_item->data = (char *) tobeinserted; tobeinserted = NULL; break; @@ -597,13 +597,13 @@ ECPGset_desc(int lineno, const char *desc_name, int index,...) char type_str[20]; snprintf(type_str, sizeof(type_str), "%d", itemtype); - ECPGraise(lineno, ECPG_UNKNOWN_DESCRIPTOR_ITEM, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, type_str); - ECPGfree(var); + ecpg_raise(lineno, ECPG_UNKNOWN_DESCRIPTOR_ITEM, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, type_str); + ecpg_free(var); return false; } } } - ECPGfree(var); + ecpg_free(var); return true; } @@ -618,15 +618,15 @@ descriptor_free(struct descriptor *desc) { struct descriptor_item *di; - ECPGfree(desc_item->data); + ecpg_free(desc_item->data); di = desc_item; desc_item = desc_item->next; - ECPGfree(di); + ecpg_free(di); } - ECPGfree(desc->name); + ecpg_free(desc->name); PQclear(desc->result); - ECPGfree(desc); + ecpg_free(desc); } bool @@ -636,7 +636,7 @@ ECPGdeallocate_desc(int line, const char *name) struct descriptor *prev; struct sqlca_t *sqlca = ECPGget_sqlca(); - ECPGinit_sqlca(sqlca); + ecpg_init_sqlca(sqlca); for (desc = get_descriptors(), prev = NULL; desc; prev = desc, desc = desc->next) { if (!strcmp(name, desc->name)) @@ -649,7 +649,7 @@ ECPGdeallocate_desc(int line, const char *name) return true; } } - ECPGraise(line, ECPG_UNKNOWN_DESCRIPTOR, ECPG_SQLSTATE_INVALID_SQL_DESCRIPTOR_NAME, name); + ecpg_raise(line, ECPG_UNKNOWN_DESCRIPTOR, ECPG_SQLSTATE_INVALID_SQL_DESCRIPTOR_NAME, name); return false; } @@ -671,15 +671,15 @@ ECPGallocate_desc(int line, const char *name) struct descriptor *new; struct sqlca_t *sqlca = ECPGget_sqlca(); - ECPGinit_sqlca(sqlca); - new = (struct descriptor *) ECPGalloc(sizeof(struct descriptor), line); + ecpg_init_sqlca(sqlca); + new = (struct descriptor *) ecpg_alloc(sizeof(struct descriptor), line); if (!new) return false; new->next = get_descriptors(); - new->name = ECPGalloc(strlen(name) + 1, line); + new->name = ecpg_alloc(strlen(name) + 1, line); if (!new->name) { - ECPGfree(new); + ecpg_free(new); return false; } new->count = -1; @@ -687,9 +687,9 @@ ECPGallocate_desc(int line, const char *name) new->result = PQmakeEmptyPGresult(NULL, 0); if (!new->result) { - ECPGfree(new->name); - ECPGfree(new); - ECPGraise(line, ECPG_OUT_OF_MEMORY, ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL); + ecpg_free(new->name); + ecpg_free(new); + ecpg_raise(line, ECPG_OUT_OF_MEMORY, ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL); return false; } strcpy(new->name, name); @@ -699,7 +699,7 @@ ECPGallocate_desc(int line, const char *name) /* Find descriptor with name in the connection. */ struct descriptor * -ECPGfind_desc(int line, const char *name) +ecpg_find_desc(int line, const char *name) { struct descriptor *desc; @@ -709,13 +709,13 @@ ECPGfind_desc(int line, const char *name) return desc; } - ECPGraise(line, ECPG_UNKNOWN_DESCRIPTOR, ECPG_SQLSTATE_INVALID_SQL_DESCRIPTOR_NAME, name); + ecpg_raise(line, ECPG_UNKNOWN_DESCRIPTOR, ECPG_SQLSTATE_INVALID_SQL_DESCRIPTOR_NAME, name); return NULL; /* not found */ } bool ECPGdescribe(int line, bool input, const char *statement,...) { - ECPGlog("ECPGdescribe called on line %d for %s in %s\n", line, (input) ? "input" : "output", statement); + ecpg_log("ECPGdescribe called on line %d for %s in %s\n", line, (input) ? "input" : "output", statement); return false; } diff --git a/src/interfaces/ecpg/ecpglib/error.c b/src/interfaces/ecpg/ecpglib/error.c index ef15cccb94..b33d3f857b 100644 --- a/src/interfaces/ecpg/ecpglib/error.c +++ b/src/interfaces/ecpg/ecpglib/error.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/error.c,v 1.17 2007/08/14 10:01:52 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/error.c,v 1.18 2007/10/03 11:11:12 meskes Exp $ */ #define POSTGRES_ECPG_INTERNAL #include "postgres_fe.h" @@ -10,7 +10,7 @@ #include "sqlca.h" void -ECPGraise(int line, int code, const char *sqlstate, const char *str) +ecpg_raise(int line, int code, const char *sqlstate, const char *str) { struct sqlca_t *sqlca = ECPGget_sqlca(); @@ -146,14 +146,14 @@ ECPGraise(int line, int code, const char *sqlstate, const char *str) } sqlca->sqlerrm.sqlerrml = strlen(sqlca->sqlerrm.sqlerrmc); - ECPGlog("raising sqlcode %d in line %d, '%s'.\n", code, line, sqlca->sqlerrm.sqlerrmc); + ecpg_log("raising sqlcode %d in line %d, '%s'.\n", code, line, sqlca->sqlerrm.sqlerrmc); /* free all memory we have allocated for the user */ ECPGfree_auto_mem(); } void -ECPGraise_backend(int line, PGresult *result, PGconn *conn, int compat) +ecpg_raise_backend(int line, PGresult *result, PGconn *conn, int compat) { struct sqlca_t *sqlca = ECPGget_sqlca(); char *sqlstate; @@ -188,7 +188,7 @@ ECPGraise_backend(int line, PGresult *result, PGconn *conn, int compat) else sqlca->sqlcode = ECPG_PGSQL; - ECPGlog("raising sqlstate %.*s (sqlcode: %d) in line %d, '%s'.\n", + ecpg_log("raising sqlstate %.*s (sqlcode: %d) in line %d, '%s'.\n", sizeof(sqlca->sqlstate), sqlca->sqlstate, sqlca->sqlcode, line, sqlca->sqlerrm.sqlerrmc); /* free all memory we have allocated for the user */ @@ -197,12 +197,12 @@ ECPGraise_backend(int line, PGresult *result, PGconn *conn, int compat) /* filter out all error codes */ bool -ECPGcheck_PQresult(PGresult *results, int lineno, PGconn *connection, enum COMPAT_MODE compat) +ecpg_check_PQresult(PGresult *results, int lineno, PGconn *connection, enum COMPAT_MODE compat) { if (results == NULL) { - ECPGlog("ECPGcheck_PQresult line %d: error: %s", lineno, PQerrorMessage(connection)); - ECPGraise_backend(lineno, NULL, connection, compat); + ecpg_log("ecpg_check_PQresult line %d: error: %s", lineno, PQerrorMessage(connection)); + ecpg_raise_backend(lineno, NULL, connection, compat); return (false); } @@ -214,7 +214,7 @@ ECPGcheck_PQresult(PGresult *results, int lineno, PGconn *connection, enum COMPA break; case PGRES_EMPTY_QUERY: /* do nothing */ - ECPGraise(lineno, ECPG_EMPTY, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, NULL); + ecpg_raise(lineno, ECPG_EMPTY, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, NULL); PQclear(results); return (false); break; @@ -224,8 +224,8 @@ ECPGcheck_PQresult(PGresult *results, int lineno, PGconn *connection, enum COMPA case PGRES_NONFATAL_ERROR: case PGRES_FATAL_ERROR: case PGRES_BAD_RESPONSE: - ECPGlog("ECPGcheck_PQresult line %d: Error: %s", lineno, PQresultErrorMessage(results)); - ECPGraise_backend(lineno, results, connection, compat); + ecpg_log("ecpg_check_PQresult line %d: Error: %s", lineno, PQresultErrorMessage(results)); + ecpg_raise_backend(lineno, results, connection, compat); PQclear(results); return (false); break; @@ -233,15 +233,15 @@ ECPGcheck_PQresult(PGresult *results, int lineno, PGconn *connection, enum COMPA return(true); break; case PGRES_COPY_IN: - ECPGlog("ECPGcheck_PQresult line %d: Got PGRES_COPY_IN ... tossing.\n", lineno); + ecpg_log("ecpg_check_PQresult line %d: Got PGRES_COPY_IN ... tossing.\n", lineno); PQendcopy(connection); PQclear(results); return(false); break; default: - ECPGlog("ECPGcheck_PQresult line %d: Got something else, postgres error.\n", + ecpg_log("ecpg_check_PQresult line %d: Got something else, postgres error.\n", lineno); - ECPGraise_backend(lineno, results, connection, compat); + ecpg_raise_backend(lineno, results, connection, compat); PQclear(results); return(false); break; diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c index 946f6811ff..034db8570c 100644 --- a/src/interfaces/ecpg/ecpglib/execute.c +++ b/src/interfaces/ecpg/ecpglib/execute.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.71 2007/10/02 09:49:59 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.72 2007/10/03 11:11:12 meskes Exp $ */ /* * The aim is to get a simpler inteface to the database routines. @@ -53,7 +53,7 @@ quote_postgres(char *arg, bool quote, int lineno) { length = strlen(arg); buffer_len = 2 * length + 1; - res = (char *) ECPGalloc(buffer_len + 3, lineno); + res = (char *) ecpg_alloc(buffer_len + 3, lineno); if (!res) return (res); escaped_len = PQescapeString(res+1, arg, buffer_len); @@ -73,7 +73,7 @@ quote_postgres(char *arg, bool quote, int lineno) res[1] = res[escaped_len+2] = '\''; res[escaped_len+3] = '\0'; } - ECPGfree(arg); + ecpg_free(arg); return res; } } @@ -86,13 +86,13 @@ free_variable(struct variable * var) if (var == NULL) return; var_next = var->next; - ECPGfree(var); + ecpg_free(var); while (var_next) { var = var_next; var_next = var->next; - ECPGfree(var); + ecpg_free(var); } } @@ -103,9 +103,9 @@ free_statement(struct statement * stmt) return; free_variable(stmt->inlist); free_variable(stmt->outlist); - ECPGfree(stmt->command); - ECPGfree(stmt->name); - ECPGfree(stmt); + ecpg_free(stmt->command); + ecpg_free(stmt->name); + ecpg_free(stmt); } static int @@ -144,10 +144,10 @@ next_insert(char *text, int pos, bool questionmarks) } static bool -ECPGtypeinfocache_push(struct ECPGtype_information_cache ** cache, int oid, bool isarray, int lineno) +ecpg_type_infocache_push(struct ECPGtype_information_cache ** cache, int oid, bool isarray, int lineno) { struct ECPGtype_information_cache *new_entry - = (struct ECPGtype_information_cache *) ECPGalloc(sizeof(struct ECPGtype_information_cache), lineno); + = (struct ECPGtype_information_cache *) ecpg_alloc(sizeof(struct ECPGtype_information_cache), lineno); if (new_entry == NULL) return (false); @@ -160,7 +160,7 @@ ECPGtypeinfocache_push(struct ECPGtype_information_cache ** cache, int oid, bool } static enum ARRAY_TYPE -ECPGis_type_an_array(int type, const struct statement * stmt, const struct variable * var) +ecpg_is_type_an_array(int type, const struct statement * stmt, const struct variable * var) { char *array_query; enum ARRAY_TYPE isarray = ECPG_ARRAY_NOT_SET; @@ -176,89 +176,89 @@ ECPGis_type_an_array(int type, const struct statement * stmt, const struct varia #define not_an_array_in_ecpg ECPG_ARRAY_NONE /* populate cache with well known types to speed things up */ - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), BOOLOID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), BOOLOID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), BYTEAOID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), BYTEAOID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), CHAROID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), CHAROID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), NAMEOID, not_an_array_in_ecpg, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), NAMEOID, not_an_array_in_ecpg, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), INT8OID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), INT8OID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), INT2OID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), INT2OID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), INT2VECTOROID, ECPG_ARRAY_VECTOR, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), INT2VECTOROID, ECPG_ARRAY_VECTOR, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), INT4OID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), INT4OID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), REGPROCOID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), REGPROCOID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), TEXTOID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), TEXTOID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), OIDOID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), OIDOID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), TIDOID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), TIDOID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), XIDOID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), XIDOID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), CIDOID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), CIDOID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), OIDVECTOROID, ECPG_ARRAY_VECTOR, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), OIDVECTOROID, ECPG_ARRAY_VECTOR, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), POINTOID, ECPG_ARRAY_VECTOR, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), POINTOID, ECPG_ARRAY_VECTOR, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), LSEGOID, ECPG_ARRAY_VECTOR, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), LSEGOID, ECPG_ARRAY_VECTOR, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), PATHOID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), PATHOID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), BOXOID, ECPG_ARRAY_VECTOR, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), BOXOID, ECPG_ARRAY_VECTOR, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), POLYGONOID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), POLYGONOID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), LINEOID, ECPG_ARRAY_VECTOR, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), LINEOID, ECPG_ARRAY_VECTOR, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), FLOAT4OID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), FLOAT4OID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), FLOAT8OID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), FLOAT8OID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), ABSTIMEOID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), ABSTIMEOID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), RELTIMEOID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), RELTIMEOID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), TINTERVALOID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), TINTERVALOID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), UNKNOWNOID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), UNKNOWNOID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), CIRCLEOID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), CIRCLEOID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), CASHOID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), CASHOID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), INETOID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), INETOID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), CIDROID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), CIDROID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), BPCHAROID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), BPCHAROID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), VARCHAROID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), VARCHAROID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), DATEOID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), DATEOID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), TIMEOID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), TIMEOID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), TIMESTAMPOID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), TIMESTAMPOID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), TIMESTAMPTZOID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), TIMESTAMPTZOID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), INTERVALOID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), INTERVALOID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), TIMETZOID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), TIMETZOID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), ZPBITOID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), ZPBITOID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), VARBITOID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), VARBITOID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); - if (!ECPGtypeinfocache_push(&(stmt->connection->cache_head), NUMERICOID, ECPG_ARRAY_NONE, stmt->lineno)) + if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), NUMERICOID, ECPG_ARRAY_NONE, stmt->lineno)) return (ECPG_ARRAY_ERROR); } @@ -268,14 +268,14 @@ ECPGis_type_an_array(int type, const struct statement * stmt, const struct varia return cache_entry->isarray; } - array_query = (char *) ECPGalloc(strlen("select typlen from pg_type where oid= and typelem<>0") + 11, stmt->lineno); + array_query = (char *) ecpg_alloc(strlen("select typlen from pg_type where oid= and typelem<>0") + 11, stmt->lineno); if (array_query == NULL) return (ECPG_ARRAY_ERROR); sprintf(array_query, "select typlen from pg_type where oid=%d and typelem<>0", type); query = PQexec(stmt->connection->connection, array_query); - ECPGfree(array_query); - if (!ECPGcheck_PQresult(query, stmt->lineno, stmt->connection->connection, stmt->compat)) + ecpg_free(array_query); + if (!ecpg_check_PQresult(query, stmt->lineno, stmt->connection->connection, stmt->compat)) return (ECPG_ARRAY_ERROR); else if (PQresultStatus(query) == PGRES_TUPLES_OK) { @@ -284,8 +284,8 @@ ECPGis_type_an_array(int type, const struct statement * stmt, const struct varia else { isarray = (atol((char *) PQgetvalue(query, 0, 0)) == -1) ? ECPG_ARRAY_ARRAY : ECPG_ARRAY_VECTOR; - if (ECPGDynamicType(type) == SQL3_CHARACTER || - ECPGDynamicType(type) == SQL3_CHARACTER_VARYING) + if (ecpg_dynamic_type(type) == SQL3_CHARACTER || + ecpg_dynamic_type(type) == SQL3_CHARACTER_VARYING) { /* * arrays of character strings are not yet implemented @@ -298,14 +298,14 @@ ECPGis_type_an_array(int type, const struct statement * stmt, const struct varia else return (ECPG_ARRAY_ERROR); - ECPGtypeinfocache_push(&(stmt->connection->cache_head), type, isarray, stmt->lineno); - ECPGlog("ECPGis_type_an_array line %d: TYPE database: %d C: %d array: %s\n", stmt->lineno, type, var->type, isarray ? "Yes" : "No"); + ecpg_type_infocache_push(&(stmt->connection->cache_head), type, isarray, stmt->lineno); + ecpg_log("ecpg_is_type_an_array line %d: TYPE database: %d C: %d array: %s\n", stmt->lineno, type, var->type, isarray ? "Yes" : "No"); return isarray; } bool -ECPGstore_result(const PGresult *results, int act_field, +ecpg_store_result(const PGresult *results, int act_field, const struct statement * stmt, struct variable * var) { enum ARRAY_TYPE isarray; @@ -313,9 +313,9 @@ ECPGstore_result(const PGresult *results, int act_field, ntuples = PQntuples(results); bool status = true; - if ((isarray = ECPGis_type_an_array(PQftype(results, act_field), stmt, var)) == ECPG_ARRAY_ERROR) + if ((isarray = ecpg_is_type_an_array(PQftype(results, act_field), stmt, var)) == ECPG_ARRAY_ERROR) { - ECPGraise(stmt->lineno, ECPG_OUT_OF_MEMORY, ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL); + ecpg_raise(stmt->lineno, ECPG_OUT_OF_MEMORY, ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL); return false; } @@ -326,9 +326,9 @@ ECPGstore_result(const PGresult *results, int act_field, */ if ((var->arrsize > 0 && ntuples > var->arrsize) || (var->ind_arrsize > 0 && ntuples > var->ind_arrsize)) { - ECPGlog("ECPGstore_result line %d: Incorrect number of matches: %d don't fit into array of %d\n", + ecpg_log("ecpg_store_result line %d: Incorrect number of matches: %d don't fit into array of %d\n", stmt->lineno, ntuples, var->arrsize); - ECPGraise(stmt->lineno, INFORMIX_MODE(stmt->compat) ? ECPG_INFORMIX_SUBSELECT_NOT_ONE : ECPG_TOO_MANY_MATCHES, ECPG_SQLSTATE_CARDINALITY_VIOLATION, NULL); + ecpg_raise(stmt->lineno, INFORMIX_MODE(stmt->compat) ? ECPG_INFORMIX_SUBSELECT_NOT_ONE : ECPG_TOO_MANY_MATCHES, ECPG_SQLSTATE_CARDINALITY_VIOLATION, NULL); return false; } } @@ -339,7 +339,7 @@ ECPGstore_result(const PGresult *results, int act_field, */ if (var->arrsize == 0) { - ECPGraise(stmt->lineno, ECPG_NO_ARRAY, ECPG_SQLSTATE_DATATYPE_MISMATCH, NULL); + ecpg_raise(stmt->lineno, ECPG_NO_ARRAY, ECPG_SQLSTATE_DATATYPE_MISMATCH, NULL); return false; } } @@ -385,12 +385,12 @@ ECPGstore_result(const PGresult *results, int act_field, len = var->offset * ntuples; break; } - ECPGlog("ECPGstore_result: line %d: allocating memory for %d tuples\n", stmt->lineno, ntuples); - var->value = (char *) ECPGalloc(len, stmt->lineno); + ecpg_log("ecpg_store_result: line %d: allocating memory for %d tuples\n", stmt->lineno, ntuples); + var->value = (char *) ecpg_alloc(len, stmt->lineno); if (!var->value) return false; *((char **) var->pointer) = var->value; - ECPGadd_mem(var->value, stmt->lineno); + ecpg_add_mem(var->value, stmt->lineno); } /* allocate indicator variable if needed */ @@ -398,11 +398,11 @@ ECPGstore_result(const PGresult *results, int act_field, { int len = var->ind_offset * ntuples; - var->ind_value = (char *) ECPGalloc(len, stmt->lineno); + var->ind_value = (char *) ecpg_alloc(len, stmt->lineno); if (!var->ind_value) return false; *((char **) var->ind_pointer) = var->ind_value; - ECPGadd_mem(var->ind_value, stmt->lineno); + ecpg_add_mem(var->ind_value, stmt->lineno); } /* fill the variable with the tuple(s) */ @@ -421,7 +421,7 @@ ECPGstore_result(const PGresult *results, int act_field, { int len = strlen(PQgetvalue(results, act_tuple, act_field)) + 1; - if (!ECPGget_data(results, act_tuple, act_field, stmt->lineno, + if (!ecpg_get_data(results, act_tuple, act_field, stmt->lineno, var->type, var->ind_type, current_data_location, var->ind_value, len, 0, var->ind_offset, isarray, stmt->compat, stmt->force_indicator)) status = false; @@ -440,7 +440,7 @@ ECPGstore_result(const PGresult *results, int act_field, { for (act_tuple = 0; act_tuple < ntuples && status; act_tuple++) { - if (!ECPGget_data(results, act_tuple, act_field, stmt->lineno, + if (!ecpg_get_data(results, act_tuple, act_field, stmt->lineno, var->type, var->ind_type, var->value, var->ind_value, var->varcharsize, var->offset, var->ind_offset, isarray, stmt->compat, stmt->force_indicator)) status = false; @@ -450,7 +450,7 @@ ECPGstore_result(const PGresult *results, int act_field, } bool -ECPGstore_input(const int lineno, const bool force_indicator, const struct variable * var, +ecpg_store_input(const int lineno, const bool force_indicator, const struct variable * var, const char **tobeinserted_p, bool quote) { char *mallocedval = NULL; @@ -463,7 +463,7 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia #if 0 if (var->arrsize > 1 &&...) { - ECPGraise(lineno, ECPG_ARRAY_INSERT, ECPG_SQLSTATE_DATATYPE_MISMATCH, NULL); + ecpg_raise(lineno, ECPG_ARRAY_INSERT, ECPG_SQLSTATE_DATATYPE_MISMATCH, NULL); return false; } #endif @@ -519,7 +519,7 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia int element; case ECPGt_short: - if (!(mallocedval = ECPGalloc(asize * 20, lineno))) + if (!(mallocedval = ecpg_alloc(asize * 20, lineno))) return false; if (asize > 1) @@ -538,7 +538,7 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia break; case ECPGt_int: - if (!(mallocedval = ECPGalloc(asize * 20, lineno))) + if (!(mallocedval = ecpg_alloc(asize * 20, lineno))) return false; if (asize > 1) @@ -557,7 +557,7 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia break; case ECPGt_unsigned_short: - if (!(mallocedval = ECPGalloc(asize * 20, lineno))) + if (!(mallocedval = ecpg_alloc(asize * 20, lineno))) return false; if (asize > 1) @@ -576,7 +576,7 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia break; case ECPGt_unsigned_int: - if (!(mallocedval = ECPGalloc(asize * 20, lineno))) + if (!(mallocedval = ecpg_alloc(asize * 20, lineno))) return false; if (asize > 1) @@ -595,7 +595,7 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia break; case ECPGt_long: - if (!(mallocedval = ECPGalloc(asize * 20, lineno))) + if (!(mallocedval = ecpg_alloc(asize * 20, lineno))) return false; if (asize > 1) @@ -614,7 +614,7 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia break; case ECPGt_unsigned_long: - if (!(mallocedval = ECPGalloc(asize * 20, lineno))) + if (!(mallocedval = ecpg_alloc(asize * 20, lineno))) return false; if (asize > 1) @@ -633,7 +633,7 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia break; #ifdef HAVE_LONG_LONG_INT_64 case ECPGt_long_long: - if (!(mallocedval = ECPGalloc(asize * 30, lineno))) + if (!(mallocedval = ecpg_alloc(asize * 30, lineno))) return false; if (asize > 1) @@ -652,7 +652,7 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia break; case ECPGt_unsigned_long_long: - if (!(mallocedval = ECPGalloc(asize * 30, lineno))) + if (!(mallocedval = ecpg_alloc(asize * 30, lineno))) return false; if (asize > 1) @@ -671,7 +671,7 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia break; #endif /* HAVE_LONG_LONG_INT_64 */ case ECPGt_float: - if (!(mallocedval = ECPGalloc(asize * 25, lineno))) + if (!(mallocedval = ecpg_alloc(asize * 25, lineno))) return false; if (asize > 1) @@ -690,7 +690,7 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia break; case ECPGt_double: - if (!(mallocedval = ECPGalloc(asize * 25, lineno))) + if (!(mallocedval = ecpg_alloc(asize * 25, lineno))) return false; if (asize > 1) @@ -709,7 +709,7 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia break; case ECPGt_bool: - if (!(mallocedval = ECPGalloc(var->arrsize + sizeof("array []"), lineno))) + if (!(mallocedval = ecpg_alloc(var->arrsize + sizeof("array []"), lineno))) return false; if (var->arrsize > 1) @@ -727,7 +727,7 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia for (element = 0; element < var->arrsize; element++) sprintf(mallocedval + strlen(mallocedval), "%c,", (((int *) var->value)[element]) ? 't' : 'f'); else - ECPGraise(lineno, ECPG_CONVERT_BOOL, ECPG_SQLSTATE_DATATYPE_MISMATCH, "different size"); + ecpg_raise(lineno, ECPG_CONVERT_BOOL, ECPG_SQLSTATE_DATATYPE_MISMATCH, "different size"); strcpy(mallocedval + strlen(mallocedval) - 1, "]"); } @@ -738,7 +738,7 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia else if (var->offset == sizeof(int)) sprintf(mallocedval, "%c", (*((int *) var->value)) ? 't' : 'f'); else - ECPGraise(lineno, ECPG_CONVERT_BOOL, ECPG_SQLSTATE_DATATYPE_MISMATCH, "different size"); + ecpg_raise(lineno, ECPG_CONVERT_BOOL, ECPG_SQLSTATE_DATATYPE_MISMATCH, "different size"); } *tobeinserted_p = mallocedval; @@ -750,7 +750,7 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia /* set slen to string length if type is char * */ int slen = (var->varcharsize == 0) ? strlen((char *) var->value) : var->varcharsize; - if (!(newcopy = ECPGalloc(slen + 1, lineno))) + if (!(newcopy = ecpg_alloc(slen + 1, lineno))) return false; strncpy(newcopy, (char *) var->value, slen); @@ -768,7 +768,7 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia { int slen = strlen((char *) var->value); - if (!(mallocedval = ECPGalloc(slen + 1, lineno))) + if (!(mallocedval = ecpg_alloc(slen + 1, lineno))) return false; strncpy(mallocedval, (char *) var->value, slen); @@ -782,7 +782,7 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia struct ECPGgeneric_varchar *variable = (struct ECPGgeneric_varchar *) (var->value); - if (!(newcopy = (char *) ECPGalloc(variable->len + 1, lineno))) + if (!(newcopy = (char *) ecpg_alloc(variable->len + 1, lineno))) return false; strncpy(newcopy, variable->arr, variable->len); @@ -820,9 +820,9 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia slen = strlen(str); PGTYPESnumeric_free(nval); - if (!(mallocedval = ECPGrealloc(mallocedval, strlen(mallocedval) + slen + sizeof("array [] "), lineno))) + if (!(mallocedval = ecpg_realloc(mallocedval, strlen(mallocedval) + slen + sizeof("array [] "), lineno))) { - ECPGfree(str); + ecpg_free(str); return false; } @@ -831,7 +831,7 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia strncpy(mallocedval + strlen(mallocedval), str, slen + 1); strcpy(mallocedval + strlen(mallocedval), ","); - ECPGfree(str); + ecpg_free(str); } strcpy(mallocedval + strlen(mallocedval) - 1, "]"); } @@ -850,7 +850,7 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia slen = strlen(str); PGTYPESnumeric_free(nval); - if (!(mallocedval = ECPGalloc(slen + 1, lineno))) + if (!(mallocedval = ecpg_alloc(slen + 1, lineno))) { free(str); return false; @@ -858,7 +858,7 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia strncpy(mallocedval, str, slen); mallocedval[slen] = '\0'; - ECPGfree(str); + ecpg_free(str); } *tobeinserted_p = mallocedval; @@ -879,9 +879,9 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia return false; slen = strlen(str); - if (!(mallocedval = ECPGrealloc(mallocedval, strlen(mallocedval) + slen + sizeof("array [],interval "), lineno))) + if (!(mallocedval = ecpg_realloc(mallocedval, strlen(mallocedval) + slen + sizeof("array [],interval "), lineno))) { - ECPGfree(str); + ecpg_free(str); return false; } @@ -890,7 +890,7 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia strncpy(mallocedval + strlen(mallocedval), str, slen + 1); strcpy(mallocedval + strlen(mallocedval), ","); - ECPGfree(str); + ecpg_free(str); } strcpy(mallocedval + strlen(mallocedval) - 1, "]"); } @@ -901,15 +901,15 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia return false; slen = strlen(str); - if (!(mallocedval = ECPGalloc(slen + sizeof("interval ") + 1, lineno))) + if (!(mallocedval = ecpg_alloc(slen + sizeof("interval ") + 1, lineno))) { - ECPGfree(str); + ecpg_free(str); return false; } /* also copy trailing '\0' */ strncpy(mallocedval + strlen(mallocedval), str, slen + 1); - ECPGfree(str); + ecpg_free(str); } *tobeinserted_p = mallocedval; @@ -930,9 +930,9 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia return false; slen = strlen(str); - if (!(mallocedval = ECPGrealloc(mallocedval, strlen(mallocedval) + slen + sizeof("array [],date "), lineno))) + if (!(mallocedval = ecpg_realloc(mallocedval, strlen(mallocedval) + slen + sizeof("array [],date "), lineno))) { - ECPGfree(str); + ecpg_free(str); return false; } @@ -941,7 +941,7 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia strncpy(mallocedval + strlen(mallocedval), str, slen + 1); strcpy(mallocedval + strlen(mallocedval), ","); - ECPGfree(str); + ecpg_free(str); } strcpy(mallocedval + strlen(mallocedval) - 1, "]"); } @@ -952,15 +952,15 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia return false; slen = strlen(str); - if (!(mallocedval = ECPGalloc(slen + sizeof("date ") + 1, lineno))) + if (!(mallocedval = ecpg_alloc(slen + sizeof("date ") + 1, lineno))) { - ECPGfree(str); + ecpg_free(str); return false; } /* also copy trailing '\0' */ strncpy(mallocedval + strlen(mallocedval), str, slen + 1); - ECPGfree(str); + ecpg_free(str); } *tobeinserted_p = mallocedval; @@ -982,9 +982,9 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia slen = strlen(str); - if (!(mallocedval = ECPGrealloc(mallocedval, strlen(mallocedval) + slen + sizeof("array [], timestamp "), lineno))) + if (!(mallocedval = ecpg_realloc(mallocedval, strlen(mallocedval) + slen + sizeof("array [], timestamp "), lineno))) { - ECPGfree(str); + ecpg_free(str); return false; } @@ -993,7 +993,7 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia strncpy(mallocedval + strlen(mallocedval), str, slen + 1); strcpy(mallocedval + strlen(mallocedval), ","); - ECPGfree(str); + ecpg_free(str); } strcpy(mallocedval + strlen(mallocedval) - 1, "]"); } @@ -1004,15 +1004,15 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia return false; slen = strlen(str); - if (!(mallocedval = ECPGalloc(slen + sizeof("timestamp") + 1, lineno))) + if (!(mallocedval = ecpg_alloc(slen + sizeof("timestamp") + 1, lineno))) { - ECPGfree(str); + ecpg_free(str); return false; } /* also copy trailing '\0' */ strncpy(mallocedval + strlen(mallocedval), str, slen + 1); - ECPGfree(str); + ecpg_free(str); } *tobeinserted_p = mallocedval; @@ -1024,7 +1024,7 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia default: /* Not implemented yet */ - ECPGraise(lineno, ECPG_UNSUPPORTED, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, (char *) ECPGtype_name(var->type)); + ecpg_raise(lineno, ECPG_UNSUPPORTED, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, (char *) ecpg_type_name(var->type)); return false; break; } @@ -1040,14 +1040,14 @@ free_params(const char **paramValues, int nParams, bool print, int lineno) for (n = 0; n < nParams; n++) { if (print) - ECPGlog("ECPGexecute line %d: parameter %d = %s\n", lineno, n + 1, paramValues[n] ? paramValues[n] : "null"); - ECPGfree((void *)(paramValues[n])); + ecpg_log("free_params line %d: parameter %d = %s\n", lineno, n + 1, paramValues[n] ? paramValues[n] : "null"); + ecpg_free((void *)(paramValues[n])); } - ECPGfree(paramValues); + ecpg_free(paramValues); } static bool -ECPGexecute(struct statement * stmt) +ecpg_execute(struct statement * stmt) { bool status = false; char *cmdstat; @@ -1088,7 +1088,7 @@ ECPGexecute(struct statement * stmt) struct descriptor *desc; struct descriptor_item *desc_item; - desc = ECPGfind_desc(stmt->lineno, var->pointer); + desc = ecpg_find_desc(stmt->lineno, var->pointer); if (desc == NULL) return false; @@ -1117,7 +1117,7 @@ ECPGexecute(struct statement * stmt) desc_inlist.ind_varcharsize = desc_inlist.ind_arrsize = 1; desc_inlist.ind_offset = 0; } - if (!ECPGstore_input(stmt->lineno, stmt->force_indicator, &desc_inlist, &tobeinserted, false)) + if (!ecpg_store_input(stmt->lineno, stmt->force_indicator, &desc_inlist, &tobeinserted, false)) return false; break; @@ -1128,7 +1128,7 @@ ECPGexecute(struct statement * stmt) } else { - if (!ECPGstore_input(stmt->lineno, stmt->force_indicator, var, &tobeinserted, false)) + if (!ecpg_store_input(stmt->lineno, stmt->force_indicator, var, &tobeinserted, false)) return false; } @@ -1140,9 +1140,9 @@ ECPGexecute(struct statement * stmt) if (var->type != ECPGt_char_variable) { nParams++; - if (!(paramValues = (const char **) ECPGrealloc(paramValues, sizeof(const char *) * nParams, stmt->lineno))) + if (!(paramValues = (const char **) ecpg_realloc(paramValues, sizeof(const char *) * nParams, stmt->lineno))) { - ECPGfree(paramValues); + ecpg_free(paramValues); return false; } @@ -1154,7 +1154,7 @@ ECPGexecute(struct statement * stmt) * We have an argument but we dont have the matched up * placeholder in the string */ - ECPGraise(stmt->lineno, ECPG_TOO_MANY_ARGUMENTS, + ecpg_raise(stmt->lineno, ECPG_TOO_MANY_ARGUMENTS, ECPG_SQLSTATE_USING_CLAUSE_DOES_NOT_MATCH_PARAMETERS, NULL); free_params(paramValues, nParams, false, stmt->lineno); @@ -1168,7 +1168,7 @@ ECPGexecute(struct statement * stmt) int buffersize = sizeof(int) * CHAR_BIT * 10 / 3; /* a rough guess of the size we need */ char *buffer, *newcopy; - if (!(buffer = (char *) ECPGalloc(buffersize, stmt->lineno))) + if (!(buffer = (char *) ecpg_alloc(buffersize, stmt->lineno))) { free_params(paramValues, nParams, false, stmt->lineno); return false; @@ -1176,10 +1176,10 @@ ECPGexecute(struct statement * stmt) snprintf(buffer, buffersize, "$%d", counter++); - if (!(newcopy = (char *) ECPGalloc(strlen(stmt->command) + strlen(buffer) + 1, stmt->lineno))) + if (!(newcopy = (char *) ecpg_alloc(strlen(stmt->command) + strlen(buffer) + 1, stmt->lineno))) { free_params(paramValues, nParams, false, stmt->lineno); - ECPGfree(buffer); + ecpg_free(buffer); return false; } @@ -1195,8 +1195,8 @@ ECPGexecute(struct statement * stmt) strcat(newcopy, stmt->command + position + 1); - ECPGfree(buffer); - ECPGfree(stmt->command); + ecpg_free(buffer); + ecpg_free(stmt->command); stmt->command = newcopy; } } @@ -1204,7 +1204,7 @@ ECPGexecute(struct statement * stmt) { char *newcopy; - if (!(newcopy = (char *) ECPGalloc(strlen(stmt->command) + if (!(newcopy = (char *) ecpg_alloc(strlen(stmt->command) + strlen(tobeinserted) + 1, stmt->lineno))) { @@ -1219,11 +1219,11 @@ ECPGexecute(struct statement * stmt) * We have an argument but we dont have the matched up string * in the string */ - ECPGraise(stmt->lineno, ECPG_TOO_MANY_ARGUMENTS, + ecpg_raise(stmt->lineno, ECPG_TOO_MANY_ARGUMENTS, ECPG_SQLSTATE_USING_CLAUSE_DOES_NOT_MATCH_PARAMETERS, NULL); free_params(paramValues, nParams, false, stmt->lineno); - ECPGfree(newcopy); + ecpg_free(newcopy); return false; } else @@ -1242,10 +1242,10 @@ ECPGexecute(struct statement * stmt) + ph_len - 1); } - ECPGfree(stmt->command); + ecpg_free(stmt->command); stmt->command = newcopy; - ECPGfree((char *)tobeinserted); + ecpg_free((char *)tobeinserted); tobeinserted = NULL; } @@ -1256,7 +1256,7 @@ ECPGexecute(struct statement * stmt) /* Check if there are unmatched things left. */ if (next_insert(stmt->command, position, stmt->questionmarks) >= 0) { - ECPGraise(stmt->lineno, ECPG_TOO_FEW_ARGUMENTS, + ecpg_raise(stmt->lineno, ECPG_TOO_FEW_ARGUMENTS, ECPG_SQLSTATE_USING_CLAUSE_DOES_NOT_MATCH_PARAMETERS, NULL); free_params(paramValues, nParams, false, stmt->lineno); return false; @@ -1267,7 +1267,7 @@ ECPGexecute(struct statement * stmt) if (stmt->connection->committed && !stmt->connection->autocommit) { results = PQexec(stmt->connection->connection, "begin transaction"); - if (!ECPGcheck_PQresult(results, stmt->lineno, stmt->connection->connection, stmt->compat)) + if (!ecpg_check_PQresult(results, stmt->lineno, stmt->connection->connection, stmt->compat)) { free_params(paramValues, nParams, false, stmt->lineno); return false; @@ -1276,29 +1276,29 @@ ECPGexecute(struct statement * stmt) stmt->connection->committed = false; } - ECPGlog("ECPGexecute line %d: QUERY: %s with %d parameter on connection %s \n", stmt->lineno, stmt->command, nParams, stmt->connection->name); + ecpg_log("ecpg_execute line %d: QUERY: %s with %d parameter on connection %s \n", stmt->lineno, stmt->command, nParams, stmt->connection->name); if (stmt->statement_type == ECPGst_execute) { results = PQexecPrepared(stmt->connection->connection, stmt->name, nParams, paramValues, NULL, NULL, 0); - ECPGlog("ECPGexecute line %d: using PQexecPrepared for %s\n", stmt->lineno, stmt->command); + ecpg_log("ecpg_execute line %d: using PQexecPrepared for %s\n", stmt->lineno, stmt->command); } else { if (nParams == 0) { results = PQexec(stmt->connection->connection, stmt->command); - ECPGlog("ECPGexecute line %d: using PQexec\n", stmt->lineno); + ecpg_log("ecpg_execute line %d: using PQexec\n", stmt->lineno); } else { results = PQexecParams(stmt->connection->connection, stmt->command, nParams, NULL, paramValues, NULL, NULL, 0); - ECPGlog("ECPGexecute line %d: using PQexecParams \n", stmt->lineno); + ecpg_log("ecpg_execute line %d: using PQexecParams \n", stmt->lineno); } } free_params(paramValues, nParams, true, stmt->lineno); - if (!ECPGcheck_PQresult(results, stmt->lineno, stmt->connection->connection, stmt->compat)) + if (!ecpg_check_PQresult(results, stmt->lineno, stmt->connection->connection, stmt->compat)) return (false); var = stmt->outlist; @@ -1311,22 +1311,22 @@ ECPGexecute(struct statement * stmt) case PGRES_TUPLES_OK: nfields = PQnfields(results); sqlca->sqlerrd[2] = ntuples = PQntuples(results); - ECPGlog("ECPGexecute line %d: Correctly got %d tuples with %d fields\n", stmt->lineno, ntuples, nfields); + ecpg_log("ecpg_execute line %d: Correctly got %d tuples with %d fields\n", stmt->lineno, ntuples, nfields); status = true; if (ntuples < 1) { if (ntuples) - ECPGlog("ECPGexecute line %d: Incorrect number of matches: %d\n", + ecpg_log("ecpg_execute line %d: Incorrect number of matches: %d\n", stmt->lineno, ntuples); - ECPGraise(stmt->lineno, ECPG_NOT_FOUND, ECPG_SQLSTATE_NO_DATA, NULL); + ecpg_raise(stmt->lineno, ECPG_NOT_FOUND, ECPG_SQLSTATE_NO_DATA, NULL); status = false; break; } if (var != NULL && var->type == ECPGt_descriptor) { - struct descriptor *desc = ECPGfind_desc(stmt->lineno, var->pointer); + struct descriptor *desc = ecpg_find_desc(stmt->lineno, var->pointer); if (desc == NULL) status = false; else @@ -1335,7 +1335,7 @@ ECPGexecute(struct statement * stmt) PQclear(desc->result); desc->result = results; clear_result = false; - ECPGlog("ECPGexecute putting result (%d tuples) into descriptor '%s'\n", PQntuples(results), (const char *) var->pointer); + ecpg_log("ecpg_execute putting result (%d tuples) into descriptor '%s'\n", PQntuples(results), (const char *) var->pointer); } var = var->next; } @@ -1344,19 +1344,19 @@ ECPGexecute(struct statement * stmt) { if (var != NULL) { - status = ECPGstore_result(results, act_field, stmt, var); + status = ecpg_store_result(results, act_field, stmt, var); var = var->next; } else if (!INFORMIX_MODE(stmt->compat)) { - ECPGraise(stmt->lineno, ECPG_TOO_FEW_ARGUMENTS, ECPG_SQLSTATE_USING_CLAUSE_DOES_NOT_MATCH_TARGETS, NULL); + ecpg_raise(stmt->lineno, ECPG_TOO_FEW_ARGUMENTS, ECPG_SQLSTATE_USING_CLAUSE_DOES_NOT_MATCH_TARGETS, NULL); return (false); } } if (status && var != NULL) { - ECPGraise(stmt->lineno, ECPG_TOO_MANY_ARGUMENTS, ECPG_SQLSTATE_USING_CLAUSE_DOES_NOT_MATCH_TARGETS, NULL); + ecpg_raise(stmt->lineno, ECPG_TOO_MANY_ARGUMENTS, ECPG_SQLSTATE_USING_CLAUSE_DOES_NOT_MATCH_TARGETS, NULL); status = false; } @@ -1366,20 +1366,20 @@ ECPGexecute(struct statement * stmt) cmdstat = PQcmdStatus(results); sqlca->sqlerrd[1] = PQoidValue(results); sqlca->sqlerrd[2] = atol(PQcmdTuples(results)); - ECPGlog("ECPGexecute line %d Ok: %s\n", stmt->lineno, cmdstat); + ecpg_log("ecpg_execute line %d Ok: %s\n", stmt->lineno, cmdstat); if (stmt->compat != ECPG_COMPAT_INFORMIX_SE && !sqlca->sqlerrd[2] && (!strncmp(cmdstat, "UPDATE", 6) || !strncmp(cmdstat, "INSERT", 6) || !strncmp(cmdstat, "DELETE", 6))) - ECPGraise(stmt->lineno, ECPG_NOT_FOUND, ECPG_SQLSTATE_NO_DATA, NULL); + ecpg_raise(stmt->lineno, ECPG_NOT_FOUND, ECPG_SQLSTATE_NO_DATA, NULL); break; case PGRES_COPY_OUT: { char *buffer; int res; - ECPGlog("ECPGexecute line %d: Got PGRES_COPY_OUT\n", stmt->lineno); + ecpg_log("ecpg_execute line %d: Got PGRES_COPY_OUT\n", stmt->lineno); while ((res = PQgetCopyData(stmt->connection->connection, &buffer, 0)) > 0) { @@ -1392,17 +1392,17 @@ ECPGexecute(struct statement * stmt) PQclear(results); results = PQgetResult(stmt->connection->connection); if (PQresultStatus(results) == PGRES_COMMAND_OK) - ECPGlog("ECPGexecute line %d: Got PGRES_COMMAND_OK after PGRES_COPY_OUT\n", stmt->lineno); + ecpg_log("ecpg_execute line %d: Got PGRES_COMMAND_OK after PGRES_COPY_OUT\n", stmt->lineno); else - ECPGlog("ECPGexecute line %d: Got error after PGRES_COPY_OUT: %s", PQresultErrorMessage(results)); + ecpg_log("ecpg_execute line %d: Got error after PGRES_COPY_OUT: %s", PQresultErrorMessage(results)); } break; } default: /* execution should never reach this code because it is already handled in ECPGcheck_PQresult() */ - ECPGlog("ECPGexecute line %d: Got something else, postgres error.\n", + ecpg_log("ecpg_execute line %d: Got something else, postgres error.\n", stmt->lineno); - ECPGraise_backend(stmt->lineno, results, stmt->connection->connection, stmt->compat); + ecpg_raise_backend(stmt->lineno, results, stmt->connection->connection, stmt->compat); status = false; break; } @@ -1413,7 +1413,7 @@ ECPGexecute(struct statement * stmt) notify = PQnotifies(stmt->connection->connection); if (notify) { - ECPGlog("ECPGexecute line %d: ASYNC NOTIFY of '%s' from backend pid '%d' received\n", + ecpg_log("ecpg_execute line %d: ASYNC NOTIFY of '%s' from backend pid '%d' received\n", stmt->lineno, notify->relname, notify->be_pid); PQfreemem(notify); } @@ -1436,25 +1436,25 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char if (!query) { - ECPGraise(lineno, ECPG_EMPTY, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, NULL); + ecpg_raise(lineno, ECPG_EMPTY, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, NULL); return(false); } /* Make sure we do NOT honor the locale for numeric input/output */ /* since the database wants the standard decimal point */ - oldlocale = ECPGstrdup(setlocale(LC_NUMERIC, NULL), lineno); + oldlocale = ecpg_strdup(setlocale(LC_NUMERIC, NULL), lineno); setlocale(LC_NUMERIC, "C"); #ifdef ENABLE_THREAD_SAFETY ecpg_pthreads_init(); #endif - con = ECPGget_connection(connection_name); + con = ecpg_get_connection(connection_name); - if (!ECPGinit(con, connection_name, lineno)) + if (!ecpg_init(con, connection_name, lineno)) { setlocale(LC_NUMERIC, oldlocale); - ECPGfree(oldlocale); + ecpg_free(oldlocale); return (false); } @@ -1479,10 +1479,10 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char * ind_arraysize - arraysize of indicator array * ind_offset - indicator offset */ - if (!(stmt = (struct statement *) ECPGalloc(sizeof(struct statement), lineno))) + if (!(stmt = (struct statement *) ecpg_alloc(sizeof(struct statement), lineno))) { setlocale(LC_NUMERIC, oldlocale); - ECPGfree(oldlocale); + ecpg_free(oldlocale); va_end(args); return false; } @@ -1491,7 +1491,7 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char * the statement before executing them */ if (statement_type == ECPGst_prepnormal) { - if (!ECPGauto_prepare(lineno, connection_name, questionmarks, &prepname, query)) + if (!ecpg_auto_prepare(lineno, connection_name, questionmarks, &prepname, query)) return(false); /* statement is now prepared, so instead of the query we have to execute the name */ @@ -1499,22 +1499,22 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char statement_type = ECPGst_execute; } else - stmt->command = ECPGstrdup(query, lineno); + stmt->command = ecpg_strdup(query, lineno); stmt->name = NULL; if (statement_type == ECPGst_execute) { /* if we have an EXECUTE command, only the name is send */ - char *command = ECPGprepared(stmt->command, con, lineno); + char *command = ecpg_prepared(stmt->command, con, lineno); if (command) { stmt->name = stmt->command; - stmt->command = ECPGstrdup(command, lineno); + stmt->command = ecpg_strdup(command, lineno); } else - ECPGraise(lineno, ECPG_INVALID_STMT, ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME, stmt->command); + ecpg_raise(lineno, ECPG_INVALID_STMT, ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME, stmt->command); } stmt->connection = con; @@ -1537,10 +1537,10 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char struct variable *var, *ptr; - if (!(var = (struct variable *) ECPGalloc(sizeof(struct variable), lineno))) + if (!(var = (struct variable *) ecpg_alloc(sizeof(struct variable), lineno))) { setlocale(LC_NUMERIC, oldlocale); - ECPGfree(oldlocale); + ecpg_free(oldlocale); free_statement(stmt); va_end(args); return false; @@ -1593,10 +1593,10 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char /* if variable is NULL, the statement hasn't been prepared */ if (var->pointer == NULL) { - ECPGraise(lineno, ECPG_INVALID_STMT, ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME, NULL); - ECPGfree(var); + ecpg_raise(lineno, ECPG_INVALID_STMT, ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME, NULL); + ecpg_free(var); setlocale(LC_NUMERIC, oldlocale); - ECPGfree(oldlocale); + ecpg_free(oldlocale); free_statement(stmt); va_end(args); return false; @@ -1619,21 +1619,21 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char if (con == NULL || con->connection == NULL) { free_statement(stmt); - ECPGraise(lineno, ECPG_NOT_CONN, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, (con) ? con->name : ""); + ecpg_raise(lineno, ECPG_NOT_CONN, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, (con) ? con->name : ""); setlocale(LC_NUMERIC, oldlocale); - ECPGfree(oldlocale); + ecpg_free(oldlocale); return false; } /* initialize auto_mem struct */ - ECPGclear_auto_mem(); + ecpg_clear_auto_mem(); - status = ECPGexecute(stmt); + status = ecpg_execute(stmt); free_statement(stmt); /* and reset locale value so our application is not affected */ setlocale(LC_NUMERIC, oldlocale); - ECPGfree(oldlocale); + ecpg_free(oldlocale); return (status); } diff --git a/src/interfaces/ecpg/ecpglib/exports.txt b/src/interfaces/ecpg/ecpglib/exports.txt new file mode 100644 index 0000000000..69ee810087 --- /dev/null +++ b/src/interfaces/ecpg/ecpglib/exports.txt @@ -0,0 +1,28 @@ +# $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/exports.txt,v 1.1 2007/10/03 11:11:12 meskes Exp $ +# Functions to be exported by libpq DLLs +ECPGallocate_desc 1 +ECPGconnect 2 +ECPGdeallocate 3 +ECPGdeallocate_all 4 +ECPGdeallocate_desc 5 +ECPGdebug 6 +ECPGdescribe 7 +ECPGdisconnect 8 +ECPGdo 9 +ECPGdo_descriptor 10 +ECPGfree_auto_mem 11 +ECPGget_desc 12 +ECPGget_desc_header 13 +ECPGget_sqlca 14 +ECPGis_noind_null 15 +ECPGprepare 16 +ECPGprepared_statement 17 +ECPGset_desc 18 +ECPGset_desc_header 19 +ECPGset_noind_null 20 +ECPGsetcommit 21 +ECPGsetconn 22 +ECPGstatus 23 +ECPGtrans 24 +sqlprint 25 + diff --git a/src/interfaces/ecpg/ecpglib/extern.h b/src/interfaces/ecpg/ecpglib/extern.h index f88782c131..f14aca7a19 100644 --- a/src/interfaces/ecpg/ecpglib/extern.h +++ b/src/interfaces/ecpg/ecpglib/extern.h @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/extern.h,v 1.30 2007/10/03 08:55:22 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/extern.h,v 1.31 2007/10/03 11:11:12 meskes Exp $ */ #ifndef _ECPG_LIB_EXTERN_H #define _ECPG_LIB_EXTERN_H @@ -25,31 +25,6 @@ enum ARRAY_TYPE ECPG_ARRAY_ERROR, ECPG_ARRAY_NOT_SET, ECPG_ARRAY_ARRAY, ECPG_ARRAY_VECTOR, ECPG_ARRAY_NONE }; -/* Here are some methods used by the lib. */ - -/* Returns a pointer to a string containing a simple type name. */ -void ECPGadd_mem(void *ptr, int lineno); - -bool ECPGget_data(const PGresult *, int, int, int, enum ECPGttype type, - enum ECPGttype, char *, char *, long, long, long, - enum ARRAY_TYPE, enum COMPAT_MODE, bool); - -#ifdef ENABLE_THREAD_SAFETY -void ecpg_pthreads_init(void); -#endif -struct connection *ECPGget_connection(const char *); -char *ECPGalloc(long, int); -char *ECPGrealloc(void *, long, int); -void ECPGfree(void *); -bool ECPGinit(const struct connection *, const char *, const int); -char *ECPGstrdup(const char *, int); -const char *ECPGtype_name(enum ECPGttype); -int ECPGDynamicType(Oid); -void ECPGfree_auto_mem(void); -void ECPGclear_auto_mem(void); - -struct descriptor *ecpggetdescp(int, char *); - /* A generic varchar type. */ struct ECPGgeneric_varchar { @@ -134,17 +109,45 @@ struct variable struct variable *next; }; -struct descriptor *ECPGfind_desc(int line, const char *name); +/* Here are some methods used by the lib. */ -bool ECPGstore_result(const PGresult *results, int act_field, +/* Returns a pointer to a string containing a simple type name. */ +void ecpg_add_mem(void *ptr, int lineno); + +bool ecpg_get_data(const PGresult *, int, int, int, enum ECPGttype type, + enum ECPGttype, char *, char *, long, long, long, + enum ARRAY_TYPE, enum COMPAT_MODE, bool); + +#ifdef ENABLE_THREAD_SAFETY +void ecpg_pthreads_init(void); +#endif +struct connection *ecpg_get_connection(const char *); +char *ecpg_alloc(long, int); +char *ecpg_realloc(void *, long, int); +void ecpg_free(void *); +bool ecpg_init(const struct connection *, const char *, const int); +char *ecpg_strdup(const char *, int); +const char *ecpg_type_name(enum ECPGttype); +int ecpg_dynamic_type(Oid); +void ecpg_free_auto_mem(void); +void ecpg_clear_auto_mem(void); + +struct descriptor *ecpggetdescp(int, char *); + +struct descriptor *ecpg_find_desc(int line, const char *name); + +bool ecpg_store_result(const PGresult *results, int act_field, const struct statement * stmt, struct variable * var); -bool ECPGstore_input(const int, const bool, const struct variable *, const char **, bool); +bool ecpg_store_input(const int, const bool, const struct variable *, const char **, bool); -bool ECPGcheck_PQresult(PGresult *, int, PGconn *, enum COMPAT_MODE); -void ECPGraise(int line, int code, const char *sqlstate, const char *str); -void ECPGraise_backend(int line, PGresult *result, PGconn *conn, int compat); -char *ECPGprepared(const char *, struct connection *, int); -bool ECPGdeallocate_all_conn(int lineno, enum COMPAT_MODE c, struct connection *conn); +bool ecpg_check_PQresult(PGresult *, int, PGconn *, enum COMPAT_MODE); +void ecpg_raise(int line, int code, const char *sqlstate, const char *str); +void ecpg_raise_backend(int line, PGresult *result, PGconn *conn, int compat); +char *ecpg_prepared(const char *, struct connection *, int); +bool ecpg_deallocate_all_conn(int lineno, enum COMPAT_MODE c, struct connection *conn); +void ecpg_log(const char *format,...); +bool ecpg_auto_prepare(int, const char *, const int, char **, const char *); +void ecpg_init_sqlca(struct sqlca_t * sqlca); /* SQLSTATE values generated or processed by ecpglib (intentionally * not exported -- users should refer to the codes directly) */ diff --git a/src/interfaces/ecpg/ecpglib/memory.c b/src/interfaces/ecpg/ecpglib/memory.c index ed1dfece37..cb22a15b75 100644 --- a/src/interfaces/ecpg/ecpglib/memory.c +++ b/src/interfaces/ecpg/ecpglib/memory.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/memory.c,v 1.10 2007/10/03 08:55:22 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/memory.c,v 1.11 2007/10/03 11:11:12 meskes Exp $ */ #define POSTGRES_ECPG_INTERNAL #include "postgres_fe.h" @@ -10,19 +10,19 @@ #include "extern.h" void -ECPGfree(void *ptr) +ecpg_free(void *ptr) { free(ptr); } char * -ECPGalloc(long size, int lineno) +ecpg_alloc(long size, int lineno) { char *new = (char *) calloc(1L, size); if (!new) { - ECPGraise(lineno, ECPG_OUT_OF_MEMORY, ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL); + ecpg_raise(lineno, ECPG_OUT_OF_MEMORY, ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL); return NULL; } @@ -30,13 +30,13 @@ ECPGalloc(long size, int lineno) } char * -ECPGrealloc(void *ptr, long size, int lineno) +ecpg_realloc(void *ptr, long size, int lineno) { char *new = (char *) realloc(ptr, size); if (!new) { - ECPGraise(lineno, ECPG_OUT_OF_MEMORY, ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL); + ecpg_raise(lineno, ECPG_OUT_OF_MEMORY, ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL); return NULL; } @@ -44,7 +44,7 @@ ECPGrealloc(void *ptr, long size, int lineno) } char * -ECPGstrdup(const char *string, int lineno) +ecpg_strdup(const char *string, int lineno) { char *new; @@ -54,7 +54,7 @@ ECPGstrdup(const char *string, int lineno) new = strdup(string); if (!new) { - ECPGraise(lineno, ECPG_OUT_OF_MEMORY, ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL); + ecpg_raise(lineno, ECPG_OUT_OF_MEMORY, ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL); return NULL; } @@ -104,9 +104,9 @@ static struct auto_mem *auto_allocs = NULL; #endif void -ECPGadd_mem(void *ptr, int lineno) +ecpg_add_mem(void *ptr, int lineno) { - struct auto_mem *am = (struct auto_mem *) ECPGalloc(sizeof(struct auto_mem), lineno); + struct auto_mem *am = (struct auto_mem *) ecpg_alloc(sizeof(struct auto_mem), lineno); am->pointer = ptr; am->next = get_auto_allocs(); @@ -125,15 +125,15 @@ ECPGfree_auto_mem(void) { struct auto_mem *act = am; am = am->next; - ECPGfree(act->pointer); - ECPGfree(act); + ecpg_free(act->pointer); + ecpg_free(act); } while(am); set_auto_allocs(NULL); } } void -ECPGclear_auto_mem(void) +ecpg_clear_auto_mem(void) { struct auto_mem *am = get_auto_allocs(); @@ -144,7 +144,7 @@ ECPGclear_auto_mem(void) { struct auto_mem *act = am; am = am->next; - ECPGfree(act); + ecpg_free(act); } while(am); set_auto_allocs(NULL); } diff --git a/src/interfaces/ecpg/ecpglib/misc.c b/src/interfaces/ecpg/ecpglib/misc.c index 136290625d..a5aa52afcd 100644 --- a/src/interfaces/ecpg/ecpglib/misc.c +++ b/src/interfaces/ecpg/ecpglib/misc.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.39 2007/10/03 08:55:22 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.40 2007/10/03 11:11:12 meskes Exp $ */ #define POSTGRES_ECPG_INTERNAL #include "postgres_fe.h" @@ -95,20 +95,20 @@ static int simple_debug = 0; static FILE *debugstream = NULL; void -ECPGinit_sqlca(struct sqlca_t * sqlca) +ecpg_init_sqlca(struct sqlca_t * sqlca) { memcpy((char *) sqlca, (char *) &sqlca_init, sizeof(struct sqlca_t)); } bool -ECPGinit(const struct connection * con, const char *connection_name, const int lineno) +ecpg_init(const struct connection * con, const char *connection_name, const int lineno) { struct sqlca_t *sqlca = ECPGget_sqlca(); - ECPGinit_sqlca(sqlca); + ecpg_init_sqlca(sqlca); if (con == NULL) { - ECPGraise(lineno, ECPG_NO_CONN, ECPG_SQLSTATE_CONNECTION_DOES_NOT_EXIST, + ecpg_raise(lineno, ECPG_NO_CONN, ECPG_SQLSTATE_CONNECTION_DOES_NOT_EXIST, connection_name ? connection_name : "NULL"); return (false); } @@ -142,7 +142,7 @@ ECPGget_sqlca(void) if (sqlca == NULL) { sqlca = malloc(sizeof(struct sqlca_t)); - ECPGinit_sqlca(sqlca); + ecpg_init_sqlca(sqlca); pthread_setspecific(sqlca_key, sqlca); } return (sqlca); @@ -154,15 +154,15 @@ ECPGget_sqlca(void) bool ECPGstatus(int lineno, const char *connection_name) { - struct connection *con = ECPGget_connection(connection_name); + struct connection *con = ecpg_get_connection(connection_name); - if (!ECPGinit(con, connection_name, lineno)) + if (!ecpg_init(con, connection_name, lineno)) return (false); /* are we connected? */ if (con->connection == NULL) { - ECPGraise(lineno, ECPG_NOT_CONN, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, con->name); + ecpg_raise(lineno, ECPG_NOT_CONN, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, con->name); return false; } @@ -173,12 +173,12 @@ bool ECPGtrans(int lineno, const char *connection_name, const char *transaction) { PGresult *res; - struct connection *con = ECPGget_connection(connection_name); + struct connection *con = ecpg_get_connection(connection_name); - if (!ECPGinit(con, connection_name, lineno)) + if (!ecpg_init(con, connection_name, lineno)) return (false); - ECPGlog("ECPGtrans line %d action = %s connection = %s\n", lineno, transaction, con ? con->name : "(nil)"); + ecpg_log("ECPGtrans line %d action = %s connection = %s\n", lineno, transaction, con ? con->name : "(nil)"); /* if we have no connection we just simulate the command */ if (con && con->connection) @@ -192,13 +192,13 @@ ECPGtrans(int lineno, const char *connection_name, const char *transaction) if (con->committed && !con->autocommit && strncmp(transaction, "begin", 5) != 0 && strncmp(transaction, "start", 5) != 0) { res = PQexec(con->connection, "begin transaction"); - if (!ECPGcheck_PQresult(res, lineno, con->connection, ECPG_COMPAT_PGSQL)) + if (!ecpg_check_PQresult(res, lineno, con->connection, ECPG_COMPAT_PGSQL)) return FALSE; PQclear(res); } res = PQexec(con->connection, transaction); - if (!ECPGcheck_PQresult(res, lineno, con->connection, ECPG_COMPAT_PGSQL)) + if (!ecpg_check_PQresult(res, lineno, con->connection, ECPG_COMPAT_PGSQL)) return FALSE; PQclear(res); } @@ -229,7 +229,7 @@ ECPGdebug(int n, FILE *dbgs) debugstream = dbgs; - ECPGlog("ECPGdebug: set to %d\n", simple_debug); + ecpg_log("ECPGdebug: set to %d\n", simple_debug); #ifdef ENABLE_THREAD_SAFETY pthread_mutex_unlock(&debug_init_mutex); @@ -237,7 +237,7 @@ ECPGdebug(int n, FILE *dbgs) } void -ECPGlog(const char *format,...) +ecpg_log(const char *format,...) { va_list ap; struct sqlca_t *sqlca = ECPGget_sqlca(); diff --git a/src/interfaces/ecpg/ecpglib/prepare.c b/src/interfaces/ecpg/ecpglib/prepare.c index 1afa63c933..5c840a51d7 100644 --- a/src/interfaces/ecpg/ecpglib/prepare.c +++ b/src/interfaces/ecpg/ecpglib/prepare.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/prepare.c,v 1.21 2007/09/30 11:38:48 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/prepare.c,v 1.22 2007/10/03 11:11:12 meskes Exp $ */ #define POSTGRES_ECPG_INTERNAL #include "postgres_fe.h" @@ -77,15 +77,15 @@ replace_variables(char **text, int lineno, bool questionmarks) int buffersize = sizeof(int) * CHAR_BIT * 10 / 3; /* a rough guess of the size we need */ char *buffer, *newcopy; - if (!(buffer = (char *) ECPGalloc(buffersize, lineno))) + if (!(buffer = (char *) ecpg_alloc(buffersize, lineno))) return false; snprintf(buffer, buffersize, "$%d", counter++); for (len=1; (*text)[ptr+len] && isvarchar((*text)[ptr+len]); len++); - if (!(newcopy = (char *) ECPGalloc(strlen(*text) - len + strlen(buffer) + 1, lineno))) + if (!(newcopy = (char *) ecpg_alloc(strlen(*text) - len + strlen(buffer) + 1, lineno))) { - ECPGfree(buffer); + ecpg_free(buffer); return false; } @@ -93,8 +93,8 @@ replace_variables(char **text, int lineno, bool questionmarks) strcpy(newcopy + ptr, buffer); strcat(newcopy, (*text) + ptr + len); - ECPGfree(*text); - ECPGfree(buffer); + ecpg_free(*text); + ecpg_free(buffer); *text = newcopy; @@ -117,9 +117,9 @@ ECPGprepare(int lineno, const char *connection_name, const int questionmarks, co struct sqlca_t *sqlca = ECPGget_sqlca(); PGresult *query; - ECPGinit_sqlca(sqlca); + ecpg_init_sqlca(sqlca); - con = ECPGget_connection(connection_name); + con = ecpg_get_connection(connection_name); /* check if we already have prepared this statement */ this = find_prepared_statement(name, con, &prev); @@ -127,21 +127,21 @@ ECPGprepare(int lineno, const char *connection_name, const int questionmarks, co return false; /* allocate new statement */ - this = (struct prepared_statement *) ECPGalloc(sizeof(struct prepared_statement), lineno); + this = (struct prepared_statement *) ecpg_alloc(sizeof(struct prepared_statement), lineno); if (!this) return false; - stmt = (struct statement *) ECPGalloc(sizeof(struct statement), lineno); + stmt = (struct statement *) ecpg_alloc(sizeof(struct statement), lineno); if (!stmt) { - ECPGfree(this); + ecpg_free(this); return false; } /* create statement */ stmt->lineno = lineno; stmt->connection = con; - stmt->command = ECPGstrdup(variable, lineno); + stmt->command = ecpg_strdup(variable, lineno); stmt->inlist = stmt->outlist = NULL; /* if we have C variables in our statment replace them with '?' */ @@ -153,15 +153,15 @@ ECPGprepare(int lineno, const char *connection_name, const int questionmarks, co /* and finally really prepare the statement */ query = PQprepare(stmt->connection->connection, name, stmt->command, 0, NULL); - if (!ECPGcheck_PQresult(query, stmt->lineno, stmt->connection->connection, stmt->compat)) + if (!ecpg_check_PQresult(query, stmt->lineno, stmt->connection->connection, stmt->compat)) { - ECPGfree(stmt->command); - ECPGfree(this); - ECPGfree(stmt); + ecpg_free(stmt->command); + ecpg_free(this); + ecpg_free(stmt); return false; } - ECPGlog("ECPGprepare line %d: NAME: %s QUERY: %s\n", stmt->lineno, name, stmt->command); + ecpg_log("ECPGprepare line %d: NAME: %s QUERY: %s\n", stmt->lineno, name, stmt->command); PQclear(query); this->prepared = true; @@ -197,7 +197,7 @@ deallocate_one(int lineno, enum COMPAT_MODE c, struct connection *con, struct pr { bool r = false; - ECPGlog("ECPGdeallocate line %d: NAME: %s\n", lineno, this->name); + ecpg_log("ECPGdeallocate line %d: NAME: %s\n", lineno, this->name); /* first deallocate the statement in the backend */ if (this->prepared) @@ -205,13 +205,13 @@ deallocate_one(int lineno, enum COMPAT_MODE c, struct connection *con, struct pr char *text; PGresult *query; - text = (char *) ECPGalloc(strlen("deallocate \"\" ") + strlen(this->name), this->stmt->lineno); + text = (char *) ecpg_alloc(strlen("deallocate \"\" ") + strlen(this->name), this->stmt->lineno); if (text) { sprintf(text, "deallocate \"%s\"", this->name); query = PQexec(this->stmt->connection->connection, text); - ECPGfree(text); - if (ECPGcheck_PQresult(query, lineno, this->stmt->connection->connection, this->stmt->compat)) + ecpg_free(text); + if (ecpg_check_PQresult(query, lineno, this->stmt->connection->connection, this->stmt->compat)) { PQclear(query); r = true; @@ -225,19 +225,19 @@ deallocate_one(int lineno, enum COMPAT_MODE c, struct connection *con, struct pr */ if (!r && !INFORMIX_MODE(c)) { - ECPGraise(lineno, ECPG_INVALID_STMT, ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME, this->name); + ecpg_raise(lineno, ECPG_INVALID_STMT, ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME, this->name); return false; } /* okay, free all the resources */ - ECPGfree(this->stmt->command); - ECPGfree(this->stmt); + ecpg_free(this->stmt->command); + ecpg_free(this->stmt); if (prev != NULL) prev->next = this->next; else con->prep_stmts = this->next; - ECPGfree(this); + ecpg_free(this); return true; } @@ -249,7 +249,7 @@ ECPGdeallocate(int lineno, int c, const char *connection_name, const char *name) struct prepared_statement *this, *prev; - con = ECPGget_connection(connection_name); + con = ecpg_get_connection(connection_name); this = find_prepared_statement(name, con, &prev); if (this) @@ -258,12 +258,12 @@ ECPGdeallocate(int lineno, int c, const char *connection_name, const char *name) /* prepared statement is not found */ if (INFORMIX_MODE(c)) return true; - ECPGraise(lineno, ECPG_INVALID_STMT, ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME, name); + ecpg_raise(lineno, ECPG_INVALID_STMT, ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME, name); return false; } bool -ECPGdeallocate_all_conn(int lineno, enum COMPAT_MODE c, struct connection *con) +ecpg_deallocate_all_conn(int lineno, enum COMPAT_MODE c, struct connection *con) { /* deallocate all prepared statements */ while (con->prep_stmts) @@ -278,11 +278,11 @@ ECPGdeallocate_all_conn(int lineno, enum COMPAT_MODE c, struct connection *con) bool ECPGdeallocate_all(int lineno, int compat, const char *connection_name) { - return ECPGdeallocate_all_conn(lineno, compat, ECPGget_connection(connection_name)); + return ecpg_deallocate_all_conn(lineno, compat, ecpg_get_connection(connection_name)); } char * -ECPGprepared(const char *name, struct connection *con, int lineno) +ecpg_prepared(const char *name, struct connection *con, int lineno) { struct prepared_statement *this; this = find_prepared_statement(name, con, NULL); @@ -293,7 +293,7 @@ ECPGprepared(const char *name, struct connection *con, int lineno) char * ECPGprepared_statement(const char *connection_name, const char *name, int lineno) { - return ECPGprepared(name, ECPGget_connection(connection_name), lineno); + return ecpg_prepared(name, ecpg_get_connection(connection_name), lineno); } /* @@ -362,7 +362,7 @@ SearchStmtCache(const char *ecpgQuery) * OR negative error code */ static int -ECPGfreeStmtCacheEntry(int entNo) /* entry # to free */ +ecpg_freeStmtCacheEntry(int entNo) /* entry # to free */ { stmtCacheEntry *entry; PGresult *results; @@ -373,13 +373,13 @@ ECPGfreeStmtCacheEntry(int entNo) /* entry # to free */ if(!entry->stmtID[0]) /* return if the entry isn't in use */ return(0); - con = ECPGget_connection(entry->connection); + con = ecpg_get_connection(entry->connection); /* free the server resources for the statement */ - ECPGlog("ECPGfreeStmtCacheEntry line %d: deallocate %s, cache entry #%d\n", entry->lineno, entry->stmtID, entNo); + ecpg_log("ecpg_freeStmtCacheEntry line %d: deallocate %s, cache entry #%d\n", entry->lineno, entry->stmtID, entNo); sprintf(deallocText, "DEALLOCATE PREPARE %s", entry->stmtID); results = PQexec(con->connection, deallocText); - if (!ECPGcheck_PQresult(results, entry->lineno, con->connection, ECPG_COMPAT_PGSQL)) + if (!ecpg_check_PQresult(results, entry->lineno, con->connection, ECPG_COMPAT_PGSQL)) return(-1); PQclear(results); @@ -388,7 +388,7 @@ ECPGfreeStmtCacheEntry(int entNo) /* entry # to free */ /* free the memory used by the cache entry */ if(entry->ecpgQuery) { - ECPGfree(entry->ecpgQuery); + ecpg_free(entry->ecpgQuery); entry->ecpgQuery = 0; } @@ -429,13 +429,13 @@ AddStmtToCache(int lineno, /* line # of statement */ entNo = luEntNo; /* re-use the 'least used' entry */ /* 'entNo' is the entry to use - make sure its free */ - if (ECPGfreeStmtCacheEntry(entNo) < 0) + if (ecpg_freeStmtCacheEntry(entNo) < 0) return (-1); /* add the query to the entry */ entry = &stmtCacheEntries[entNo]; entry->lineno = lineno; - entry->ecpgQuery = ECPGstrdup(ecpgQuery, lineno); + entry->ecpgQuery = ecpg_strdup(ecpgQuery, lineno); entry->connection = (char *)connection; entry->execs = 0; memcpy(entry->stmtID, stmtID, sizeof(entry->stmtID)); @@ -445,7 +445,7 @@ AddStmtToCache(int lineno, /* line # of statement */ /* handle cache and preparation of statments in auto-prepare mode */ bool -ECPGauto_prepare(int lineno, const char *connection_name, const int questionmarks, char **name, const char *query) +ecpg_auto_prepare(int lineno, const char *connection_name, const int questionmarks, char **name, const char *query) { int entNo; @@ -455,18 +455,18 @@ ECPGauto_prepare(int lineno, const char *connection_name, const int questionmark /* if not found - add the statement to the cache */ if(entNo) { - ECPGlog("ECPGauto_prepare line %d: stmt found in cache, entry %d\n", lineno, entNo); - *name = ECPGstrdup(stmtCacheEntries[entNo].stmtID, lineno); + ecpg_log("ecpg_auto_prepare line %d: stmt found in cache, entry %d\n", lineno, entNo); + *name = ecpg_strdup(stmtCacheEntries[entNo].stmtID, lineno); } else { - ECPGlog("ECPGauto_prepare line %d: stmt not in cache; inserting\n", lineno); + ecpg_log("ecpg_auto_prepare line %d: stmt not in cache; inserting\n", lineno); /* generate a statement ID */ - *name = (char *) ECPGalloc(STMTID_SIZE, lineno); + *name = (char *) ecpg_alloc(STMTID_SIZE, lineno); sprintf(*name, "ecpg%d", nextStmtID++); - if (!ECPGprepare(lineno, connection_name, questionmarks, ECPGstrdup(*name, lineno), query)) + if (!ECPGprepare(lineno, connection_name, questionmarks, ecpg_strdup(*name, lineno), query)) return(false); if (AddStmtToCache(lineno, *name, connection_name, query) < 0) return(false); diff --git a/src/interfaces/ecpg/ecpglib/typename.c b/src/interfaces/ecpg/ecpglib/typename.c index ad4ef6c4f2..8a0c779809 100644 --- a/src/interfaces/ecpg/ecpglib/typename.c +++ b/src/interfaces/ecpg/ecpglib/typename.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/typename.c,v 1.12 2007/02/02 09:31:10 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/typename.c,v 1.13 2007/10/03 11:11:12 meskes Exp $ */ #define POSTGRES_ECPG_INTERNAL #include "postgres_fe.h" @@ -14,7 +14,7 @@ * This function is used to generate the correct type names. */ const char * -ECPGtype_name(enum ECPGttype typ) +ecpg_type_name(enum ECPGttype typ) { switch (typ) { @@ -67,7 +67,7 @@ ECPGtype_name(enum ECPGttype typ) } int -ECPGDynamicType(Oid type) +ecpg_dynamic_type(Oid type) { switch (type) { diff --git a/src/interfaces/ecpg/include/ecpglib.h b/src/interfaces/ecpg/include/ecpglib.h index 7a24618c83..ac7cd4f19e 100644 --- a/src/interfaces/ecpg/include/ecpglib.h +++ b/src/interfaces/ecpg/include/ecpglib.h @@ -1,7 +1,7 @@ /* * this is a small part of c.h since we don't want to leak all postgres * definitions into ecpg programs - * $PostgreSQL: pgsql/src/interfaces/ecpg/include/ecpglib.h,v 1.72 2007/09/26 10:57:00 meskes Exp $ + * $PostgreSQL: pgsql/src/interfaces/ecpg/include/ecpglib.h,v 1.73 2007/10/03 11:11:12 meskes Exp $ */ #ifndef _ECPGLIB_H @@ -38,7 +38,6 @@ extern "C" { #endif -void ECPGinit_sqlca(struct sqlca_t * sqlca); void ECPGdebug(int, FILE *); bool ECPGstatus(int, const char *); bool ECPGsetcommit(int, const char *, const char *); @@ -48,12 +47,10 @@ bool ECPGdo(const int, const int, const int, const char *, const char, const en bool ECPGtrans(int, const char *, const char *); bool ECPGdisconnect(int, const char *); bool ECPGprepare(int, const char *, const int, const char *, const char *); -bool ECPGauto_prepare(int, const char *, const int, char **, const char *); bool ECPGdeallocate(int, int, const char *connection_name, const char *name); bool ECPGdeallocate_all(int, int, const char *connection_name); char *ECPGprepared_statement(const char *connection_name, const char *name, int); -void ECPGlog(const char *format,...); char *ECPGerrmsg(void); /* print an error message */ diff --git a/src/interfaces/ecpg/preproc/preproc.y b/src/interfaces/ecpg/preproc/preproc.y index cd0d94ff97..1c7cf0c72a 100644 --- a/src/interfaces/ecpg/preproc/preproc.y +++ b/src/interfaces/ecpg/preproc/preproc.y @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.352 2007/09/26 10:57:00 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.353 2007/10/03 11:11:12 meskes Exp $ */ /* Copyright comment */ %{ @@ -245,17 +245,17 @@ adjust_informix(struct arguments *list) if ((ptr->variable->type->type != ECPGt_varchar && ptr->variable->type->type != ECPGt_char && ptr->variable->type->type != ECPGt_unsigned_char) && atoi(ptr->variable->type->size) > 1) { - ptr->variable = new_variable(cat_str(4, make_str("("), mm_strdup(ECPGtype_name(ptr->variable->type->u.element->type)), make_str(" *)(ECPG_informix_get_var("), mm_strdup(temp)), ECPGmake_array_type(ECPGmake_simple_type(ptr->variable->type->u.element->type, make_str("1"), ptr->variable->type->u.element->lineno), ptr->variable->type->size), 0); + ptr->variable = new_variable(cat_str(4, make_str("("), mm_strdup(ecpg_type_name(ptr->variable->type->u.element->type)), make_str(" *)(ECPG_informix_get_var("), mm_strdup(temp)), ECPGmake_array_type(ECPGmake_simple_type(ptr->variable->type->u.element->type, make_str("1"), ptr->variable->type->u.element->lineno), ptr->variable->type->size), 0); sprintf(temp, "%d, (", ecpg_informix_var++); } else if ((ptr->variable->type->type == ECPGt_varchar || ptr->variable->type->type == ECPGt_char || ptr->variable->type->type == ECPGt_unsigned_char) && atoi(ptr->variable->type->size) > 1) { - ptr->variable = new_variable(cat_str(4, make_str("("), mm_strdup(ECPGtype_name(ptr->variable->type->type)), make_str(" *)(ECPG_informix_get_var("), mm_strdup(temp)), ECPGmake_simple_type(ptr->variable->type->type, ptr->variable->type->size, ptr->variable->type->lineno), 0); + ptr->variable = new_variable(cat_str(4, make_str("("), mm_strdup(ecpg_type_name(ptr->variable->type->type)), make_str(" *)(ECPG_informix_get_var("), mm_strdup(temp)), ECPGmake_simple_type(ptr->variable->type->type, ptr->variable->type->size, ptr->variable->type->lineno), 0); sprintf(temp, "%d, (", ecpg_informix_var++); } else { - ptr->variable = new_variable(cat_str(4, make_str("*("), mm_strdup(ECPGtype_name(ptr->variable->type->type)), make_str(" *)(ECPG_informix_get_var("), mm_strdup(temp)), ECPGmake_simple_type(ptr->variable->type->type, ptr->variable->type->size, ptr->variable->type->lineno), 0); + ptr->variable = new_variable(cat_str(4, make_str("*("), mm_strdup(ecpg_type_name(ptr->variable->type->type)), make_str(" *)(ECPG_informix_get_var("), mm_strdup(temp)), ECPGmake_simple_type(ptr->variable->type->type, ptr->variable->type->size, ptr->variable->type->lineno), 0); sprintf(temp, "%d, &(", ecpg_informix_var++); } @@ -272,12 +272,12 @@ adjust_informix(struct arguments *list) /* create call to "ECPG_informix_set_var(, . )" */ if (atoi(ptr->indicator->type->size) > 1) { - ptr->indicator = new_variable(cat_str(4, make_str("("), mm_strdup(ECPGtype_name(ptr->indicator->type->type)), make_str(" *)(ECPG_informix_get_var("), mm_strdup(temp)), ECPGmake_simple_type(ptr->indicator->type->type, ptr->indicator->type->size, ptr->variable->type->lineno), 0); + ptr->indicator = new_variable(cat_str(4, make_str("("), mm_strdup(ecpg_type_name(ptr->indicator->type->type)), make_str(" *)(ECPG_informix_get_var("), mm_strdup(temp)), ECPGmake_simple_type(ptr->indicator->type->type, ptr->indicator->type->size, ptr->variable->type->lineno), 0); sprintf(temp, "%d, (", ecpg_informix_var++); } else { - ptr->indicator = new_variable(cat_str(4, make_str("*("), mm_strdup(ECPGtype_name(ptr->indicator->type->type)), make_str(" *)(ECPG_informix_get_var("), mm_strdup(temp)), ECPGmake_simple_type(ptr->indicator->type->type, ptr->indicator->type->size, ptr->variable->type->lineno), 0); + ptr->indicator = new_variable(cat_str(4, make_str("*("), mm_strdup(ecpg_type_name(ptr->indicator->type->type)), make_str(" *)(ECPG_informix_get_var("), mm_strdup(temp)), ECPGmake_simple_type(ptr->indicator->type->type, ptr->indicator->type->size, ptr->variable->type->lineno), 0); sprintf(temp, "%d, &(", ecpg_informix_var++); } result = cat_str(5, result, make_str("ECPG_informix_set_var("), mm_strdup(temp), mm_strdup(original_var), make_str("), __LINE__);\n")); @@ -5351,7 +5351,7 @@ storage_modifier : S_CONST { $$ = make_str("const"); } var_type: simple_type { $$.type_enum = $1; - $$.type_str = mm_strdup(ECPGtype_name($1)); + $$.type_str = mm_strdup(ecpg_type_name($1)); $$.type_dimension = make_str("-1"); $$.type_index = make_str("-1"); $$.type_sizeof = NULL; diff --git a/src/interfaces/ecpg/preproc/type.c b/src/interfaces/ecpg/preproc/type.c index 18708217e0..67ea33a0a0 100644 --- a/src/interfaces/ecpg/preproc/type.c +++ b/src/interfaces/ecpg/preproc/type.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/type.c,v 1.74 2007/08/22 08:20:58 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/type.c,v 1.75 2007/10/03 11:11:12 meskes Exp $ */ #include "postgres_fe.h" @@ -427,7 +427,7 @@ ECPGdump_a_simple(FILE *o, const char *name, enum ECPGttype type, else sprintf(variable, "&(%s%s)", prefix ? prefix : "", name); - sprintf(offset, "sizeof(%s)", ECPGtype_name(type)); + sprintf(offset, "sizeof(%s)", ecpg_type_name(type)); break; } diff --git a/src/interfaces/ecpg/preproc/type.h b/src/interfaces/ecpg/preproc/type.h index f28c0538aa..eff94b40d1 100644 --- a/src/interfaces/ecpg/preproc/type.h +++ b/src/interfaces/ecpg/preproc/type.h @@ -61,7 +61,7 @@ struct ECPGtemp_type const char *name; }; -extern const char *ECPGtype_name(enum ECPGttype type); +extern const char *ecpg_type_name(enum ECPGttype type); /* some stuff for whenever statements */ enum WHEN_TYPE diff --git a/src/interfaces/ecpg/test/expected/compat_informix-rnull.stderr b/src/interfaces/ecpg/test/expected/compat_informix-rnull.stderr index 2a8290df3b..672229cb7a 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-rnull.stderr +++ b/src/interfaces/ecpg/test/expected/compat_informix-rnull.stderr @@ -2,121 +2,121 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 31: QUERY: create table test ( id int , c char ( 10 ) , s smallint , i int , b bool , f float , l bigint , dbl double precision , dec decimal , dat date , tmp timestamptz ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 31: QUERY: create table test ( id int , c char ( 10 ) , s smallint , i int , b bool , f float , l bigint , dbl double precision , dec decimal , dat date , tmp timestamptz ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 31: using PQexec +[NO_PID]: ecpg_execute line 31: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 31 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 31 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 34 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 36: QUERY: insert into test ( id , c , s , i , b , f , l , dbl ) values ( 1 , $1 , $2 , $3 , $4 , $5 , $6 , $7 ) with 7 parameter on connection regress1 +[NO_PID]: ecpg_execute line 36: QUERY: insert into test ( id , c , s , i , b , f , l , dbl ) values ( 1 , $1 , $2 , $3 , $4 , $5 , $6 , $7 ) with 7 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 36: using PQexecParams +[NO_PID]: ecpg_execute line 36: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 36: parameter 1 = abc +[NO_PID]: free_params line 36: parameter 1 = abc [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 36: parameter 2 = 17 +[NO_PID]: free_params line 36: parameter 2 = 17 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 36: parameter 3 = -74874 +[NO_PID]: free_params line 36: parameter 3 = -74874 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 36: parameter 4 = t +[NO_PID]: free_params line 36: parameter 4 = t [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 36: parameter 5 = 3.710000038147 +[NO_PID]: free_params line 36: parameter 5 = 3.710000038147 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 36: parameter 6 = 487444 +[NO_PID]: free_params line 36: parameter 6 = 487444 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 36: parameter 7 = 404.404 +[NO_PID]: free_params line 36: parameter 7 = 404.404 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 36 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 36 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 39 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: QUERY: insert into test ( id , c , s , i , b , f , l , dbl , dec , dat , tmp ) values ( 2 , $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 ) with 10 parameter on connection regress1 +[NO_PID]: ecpg_execute line 52: QUERY: insert into test ( id , c , s , i , b , f , l , dbl , dec , dat , tmp ) values ( 2 , $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 ) with 10 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: using PQexecParams +[NO_PID]: ecpg_execute line 52: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: parameter 1 = null +[NO_PID]: free_params line 52: parameter 1 = null [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: parameter 2 = null +[NO_PID]: free_params line 52: parameter 2 = null [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: parameter 3 = null +[NO_PID]: free_params line 52: parameter 3 = null [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: parameter 4 = t +[NO_PID]: free_params line 52: parameter 4 = t [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: parameter 5 = null +[NO_PID]: free_params line 52: parameter 5 = null [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: parameter 6 = null +[NO_PID]: free_params line 52: parameter 6 = null [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: parameter 7 = null +[NO_PID]: free_params line 52: parameter 7 = null [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: parameter 8 = null +[NO_PID]: free_params line 52: parameter 8 = null [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: parameter 9 = null +[NO_PID]: free_params line 52: parameter 9 = null [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: parameter 10 = null +[NO_PID]: free_params line 52: parameter 10 = null [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 52 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 55 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 59: QUERY: select c , s , i , b , f , l , dbl , dec , dat , tmp from test where id = 1 with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 59: QUERY: select c , s , i , b , f , l , dbl , dec , dat , tmp from test where id = 1 with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 59: using PQexec +[NO_PID]: ecpg_execute line 59: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 59: Correctly got 1 tuples with 10 fields +[NO_PID]: ecpg_execute line 59: Correctly got 1 tuples with 10 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 59: RESULT: abc offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 59: RESULT: abc offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 59: RESULT: 17 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 59: RESULT: 17 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 59: RESULT: -74874 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 59: RESULT: -74874 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 59: RESULT: t offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 59: RESULT: t offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 59: RESULT: 3.710000038147 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 59: RESULT: 3.710000038147 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 59: RESULT: 487444 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 59: RESULT: 487444 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 59: RESULT: 404.404 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 59: RESULT: 404.404 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 59: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 59: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 59: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 59: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 59: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 59: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 76: QUERY: select c , s , i , b , f , l , dbl , dec , dat , tmp from test where id = 2 with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 76: QUERY: select c , s , i , b , f , l , dbl , dec , dat , tmp from test where id = 2 with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 76: using PQexec +[NO_PID]: ecpg_execute line 76: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 76: Correctly got 1 tuples with 10 fields +[NO_PID]: ecpg_execute line 76: Correctly got 1 tuples with 10 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 76: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 76: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 76: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 76: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 76: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 76: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 76: RESULT: t offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 76: RESULT: t offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 76: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 76: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 76: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 76: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 76: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 76: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 76: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 76: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 76: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 76: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 76: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 76: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 91: QUERY: drop table test with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 91: QUERY: drop table test with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 91: using PQexec +[NO_PID]: ecpg_execute line 91: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 91 Ok: DROP TABLE +[NO_PID]: ecpg_execute line 91 Ok: DROP TABLE [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 92 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/compat_informix-test_informix.stderr b/src/interfaces/ecpg/test/expected/compat_informix-test_informix.stderr index b07e9193a3..94b17d15e9 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-test_informix.stderr +++ b/src/interfaces/ecpg/test/expected/compat_informix-test_informix.stderr @@ -2,125 +2,125 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 23: QUERY: create table test ( i int primary key , j int ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 23: QUERY: create table test ( i int primary key , j int ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 23: using PQexec +[NO_PID]: ecpg_execute line 23: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 23 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 23 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 27: QUERY: insert into test ( i , j ) values ( 7 , $1 ) with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 27: QUERY: insert into test ( i , j ) values ( 7 , $1 ) with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 27: using PQexecParams +[NO_PID]: ecpg_execute line 27: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 27: parameter 1 = 0 +[NO_PID]: free_params line 27: parameter 1 = 0 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 27 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 27 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 28 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 31: QUERY: insert into test ( i , j ) values ( 7 , 12 ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 31: QUERY: insert into test ( i , j ) values ( 7 , 12 ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 31: using PQexec +[NO_PID]: ecpg_execute line 31: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGcheck_PQresult line 31: Error: ERROR: duplicate key value violates unique constraint "test_pkey" +[NO_PID]: ecpg_check_PQresult line 31: Error: ERROR: duplicate key value violates unique constraint "test_pkey" [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: raising sqlstate 23505 (sqlcode: -239) in line 31, ''duplicate key value violates unique constraint "test_pkey"' in line 31.'. [NO_PID]: sqlca: code: -239, state: 23505 [NO_PID]: ECPGtrans line 33 action = rollback connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: QUERY: insert into test ( i , j ) values ( $1 , 1 ) with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 35: QUERY: insert into test ( i , j ) values ( $1 , 1 ) with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: using PQexecParams +[NO_PID]: ecpg_execute line 35: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: parameter 1 = 14 +[NO_PID]: free_params line 35: parameter 1 = 14 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 35 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 36 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 39: QUERY: select i from test where j = ( select j from test ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 39: QUERY: select i from test where j = ( select j from test ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 39: using PQexec +[NO_PID]: ecpg_execute line 39: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGcheck_PQresult line 39: Error: ERROR: more than one row returned by a subquery used as an expression +[NO_PID]: ecpg_check_PQresult line 39: Error: ERROR: more than one row returned by a subquery used as an expression [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: raising sqlstate 21000 (sqlcode: -284) in line 39, ''more than one row returned by a subquery used as an expression' in line 39.'. [NO_PID]: sqlca: code: -284, state: 21000 [NO_PID]: ECPGtrans line 40 action = rollback connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 43: QUERY: select i from test where j = ( select j from test order by i limit 1 ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 43: QUERY: select i from test where j = ( select j from test order by i limit 1 ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 43: using PQexec +[NO_PID]: ecpg_execute line 43: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 43: Correctly got 1 tuples with 1 fields +[NO_PID]: ecpg_execute line 43: Correctly got 1 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 92: QUERY: declare c cursor for select * from test where i <= $1 with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 92: QUERY: declare c cursor for select * from test where i <= $1 with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 92: using PQexecParams +[NO_PID]: ecpg_execute line 92: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 92: parameter 1 = 14 +[NO_PID]: free_params line 92: parameter 1 = 14 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 92 Ok: DECLARE CURSOR +[NO_PID]: ecpg_execute line 92 Ok: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 54: QUERY: fetch forward from c with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 54: QUERY: fetch forward from c with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 54: using PQexec +[NO_PID]: ecpg_execute line 54: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 54: Correctly got 1 tuples with 2 fields +[NO_PID]: ecpg_execute line 54: Correctly got 1 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 54: RESULT: 7 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 54: RESULT: 7 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 54: RESULT: 0 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 54: RESULT: 0 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 54: QUERY: fetch forward from c with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 54: QUERY: fetch forward from c with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 54: using PQexec +[NO_PID]: ecpg_execute line 54: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 54: Correctly got 1 tuples with 2 fields +[NO_PID]: ecpg_execute line 54: Correctly got 1 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 54: RESULT: 14 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 54: RESULT: 14 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 54: RESULT: 1 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 54: RESULT: 1 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 54: QUERY: fetch forward from c with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 54: QUERY: fetch forward from c with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 54: using PQexec +[NO_PID]: ecpg_execute line 54: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 54: Correctly got 0 tuples with 2 fields +[NO_PID]: ecpg_execute line 54: Correctly got 0 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: raising sqlcode 100 in line 54, 'No data found in line 54.'. [NO_PID]: sqlca: code: 100, state: 02000 -[NO_PID]: ECPGexecute line 72: QUERY: delete from test where i = $1 :: decimal with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 72: QUERY: delete from test where i = $1 :: decimal with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 72: using PQexecParams +[NO_PID]: ecpg_execute line 72: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 72: parameter 1 = 21.0 +[NO_PID]: free_params line 72: parameter 1 = 21.0 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 72 Ok: DELETE 0 +[NO_PID]: ecpg_execute line 72 Ok: DELETE 0 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: raising sqlcode 100 in line 72, 'No data found in line 72.'. [NO_PID]: sqlca: code: 100, state: 02000 -[NO_PID]: ECPGexecute line 75: QUERY: select 1 from test where i = 14 with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 75: QUERY: select 1 from test where i = 14 with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 75: using PQexec +[NO_PID]: ecpg_execute line 75: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 75: Correctly got 1 tuples with 1 fields +[NO_PID]: ecpg_execute line 75: Correctly got 1 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 78: QUERY: select 1 from test where i = 147 with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 78: QUERY: select 1 from test where i = 147 with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 78: using PQexec +[NO_PID]: ecpg_execute line 78: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 78: Correctly got 0 tuples with 1 fields +[NO_PID]: ecpg_execute line 78: Correctly got 0 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: raising sqlcode 100 in line 78, 'No data found in line 78.'. [NO_PID]: sqlca: code: 100, state: 02000 [NO_PID]: ECPGtrans line 81 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 82: QUERY: drop table test with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 82: QUERY: drop table test with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 82: using PQexec +[NO_PID]: ecpg_execute line 82: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 82 Ok: DROP TABLE +[NO_PID]: ecpg_execute line 82 Ok: DROP TABLE [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 83 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.stderr b/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.stderr index 1e3e6862ca..d1f4f54ef1 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.stderr +++ b/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.stderr @@ -2,61 +2,61 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 66: QUERY: set DateStyle to 'DMY' with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 66: QUERY: set DateStyle to 'DMY' with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 66: using PQexec +[NO_PID]: ecpg_execute line 66: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 66 Ok: SET +[NO_PID]: ecpg_execute line 66 Ok: SET [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 68: QUERY: create table history ( customerid integer , timestamp timestamp without time zone , action_taken char ( 5 ) , narrative varchar ( 100 ) ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 68: QUERY: create table history ( customerid integer , timestamp timestamp without time zone , action_taken char ( 5 ) , narrative varchar ( 100 ) ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 68: using PQexec +[NO_PID]: ecpg_execute line 68: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 68 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 68 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 71: QUERY: insert into history ( customerid , timestamp , action_taken , narrative ) values ( 1 , '2003-05-07 13:28:34 CEST' , 'test' , 'test' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 71: QUERY: insert into history ( customerid , timestamp , action_taken , narrative ) values ( 1 , '2003-05-07 13:28:34 CEST' , 'test' , 'test' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 71: using PQexec +[NO_PID]: ecpg_execute line 71: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 71 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 71 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 76: QUERY: select max ( timestamp ) from history with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 76: QUERY: select max ( timestamp ) from history with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 76: using PQexec +[NO_PID]: ecpg_execute line 76: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 76: Correctly got 1 tuples with 1 fields +[NO_PID]: ecpg_execute line 76: Correctly got 1 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 76: RESULT: Wed 07 May 13:28:34 2003 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 76: RESULT: Wed 07 May 13:28:34 2003 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 81: QUERY: select customerid , timestamp from history where timestamp = $1 limit 1 with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 81: QUERY: select customerid , timestamp from history where timestamp = $1 limit 1 with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 81: using PQexecParams +[NO_PID]: ecpg_execute line 81: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 81: parameter 1 = 2003-05-07 13:28:34 +[NO_PID]: free_params line 81: parameter 1 = 2003-05-07 13:28:34 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 81: Correctly got 1 tuples with 2 fields +[NO_PID]: ecpg_execute line 81: Correctly got 1 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 81: RESULT: 1 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 81: RESULT: 1 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 81: RESULT: Wed 07 May 13:28:34 2003 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 81: RESULT: Wed 07 May 13:28:34 2003 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 95: QUERY: insert into history ( customerid , timestamp , action_taken , narrative ) values ( $1 , $2 , 'test' , 'test' ) with 2 parameter on connection regress1 +[NO_PID]: ecpg_execute line 95: QUERY: insert into history ( customerid , timestamp , action_taken , narrative ) values ( $1 , $2 , 'test' , 'test' ) with 2 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 95: using PQexecParams +[NO_PID]: ecpg_execute line 95: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 95: parameter 1 = 2 +[NO_PID]: free_params line 95: parameter 1 = 2 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 95: parameter 2 = 2003-05-08 15:53:39 +[NO_PID]: free_params line 95: parameter 2 = 2003-05-08 15:53:39 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 95 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 95 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 100 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 102: QUERY: drop table history with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 102: QUERY: drop table history with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 102: using PQexec +[NO_PID]: ecpg_execute line 102: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 102 Ok: DROP TABLE +[NO_PID]: ecpg_execute line 102 Ok: DROP TABLE [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 105 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/connect-test1.stderr b/src/interfaces/ecpg/test/expected/connect-test1.stderr index ffd206ce26..b0ba89b85c 100644 --- a/src/interfaces/ecpg/test/expected/connect-test1.stderr +++ b/src/interfaces/ecpg/test/expected/connect-test1.stderr @@ -2,11 +2,11 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database connectdb on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 23: QUERY: alter user connectuser encrypted password 'connectpw' with 0 parameter on connection main +[NO_PID]: ecpg_execute line 23: QUERY: alter user connectuser encrypted password 'connectpw' with 0 parameter on connection main [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 23: using PQexec +[NO_PID]: ecpg_execute line 23: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 23 Ok: ALTER ROLE +[NO_PID]: ecpg_execute line 23 Ok: ALTER ROLE [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection main closed. [NO_PID]: sqlca: code: 0, state: 00000 @@ -56,7 +56,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database nonexistant on localhost port for user connectuser [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: connect: could not open database nonexistant on localhost port for user connectuser in line 62 +[NO_PID]: ECPGconnect: could not open database nonexistant on localhost port for user connectuser in line 62 FATAL: database "nonexistant" does not exist [NO_PID]: sqlca: code: 0, state: 00000 @@ -68,7 +68,7 @@ [NO_PID]: sqlca: code: -220, state: 08003 [NO_PID]: ECPGconnect: opening database connectdb on localhost port for user connectuser [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: connect: could not open database connectdb on localhost port for user connectuser in line 66 +[NO_PID]: ECPGconnect: could not open database connectdb on localhost port for user connectuser in line 66 could not connect to server: Connection refused Is the server running on host "localhost" and accepting TCP/IP connections on port 20? diff --git a/src/interfaces/ecpg/test/expected/connect-test2.stderr b/src/interfaces/ecpg/test/expected/connect-test2.stderr index 2e497d5edf..54b18a5059 100644 --- a/src/interfaces/ecpg/test/expected/connect-test2.stderr +++ b/src/interfaces/ecpg/test/expected/connect-test2.stderr @@ -4,47 +4,47 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 28: QUERY: select current_database () with 0 parameter on connection second +[NO_PID]: ecpg_execute line 28: QUERY: select current_database () with 0 parameter on connection second [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 28: using PQexec +[NO_PID]: ecpg_execute line 28: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 28: Correctly got 1 tuples with 1 fields +[NO_PID]: ecpg_execute line 28: Correctly got 1 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 28: RESULT: regress1 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 28: RESULT: regress1 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 29: QUERY: select current_database () with 0 parameter on connection first +[NO_PID]: ecpg_execute line 29: QUERY: select current_database () with 0 parameter on connection first [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 29: using PQexec +[NO_PID]: ecpg_execute line 29: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 29: Correctly got 1 tuples with 1 fields +[NO_PID]: ecpg_execute line 29: Correctly got 1 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 29: RESULT: connectdb offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 29: RESULT: connectdb offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 30: QUERY: select current_database () with 0 parameter on connection second +[NO_PID]: ecpg_execute line 30: QUERY: select current_database () with 0 parameter on connection second [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 30: using PQexec +[NO_PID]: ecpg_execute line 30: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 30: Correctly got 1 tuples with 1 fields +[NO_PID]: ecpg_execute line 30: Correctly got 1 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 30: RESULT: regress1 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 30: RESULT: regress1 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 33: QUERY: select current_database () with 0 parameter on connection first +[NO_PID]: ecpg_execute line 33: QUERY: select current_database () with 0 parameter on connection first [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 33: using PQexec +[NO_PID]: ecpg_execute line 33: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 33: Correctly got 1 tuples with 1 fields +[NO_PID]: ecpg_execute line 33: Correctly got 1 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 33: RESULT: connectdb offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 33: RESULT: connectdb offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection first closed. [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 37: QUERY: select current_database () with 0 parameter on connection second +[NO_PID]: ecpg_execute line 37: QUERY: select current_database () with 0 parameter on connection second [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 37: using PQexec +[NO_PID]: ecpg_execute line 37: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 37: Correctly got 1 tuples with 1 fields +[NO_PID]: ecpg_execute line 37: Correctly got 1 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 37: RESULT: regress1 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 37: RESULT: regress1 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: raising sqlcode -220 in line 40, 'No such connection first in line 40.'. [NO_PID]: sqlca: code: -220, state: 08003 diff --git a/src/interfaces/ecpg/test/expected/connect-test3.stderr b/src/interfaces/ecpg/test/expected/connect-test3.stderr index 42927afc46..a45cb9cd1a 100644 --- a/src/interfaces/ecpg/test/expected/connect-test3.stderr +++ b/src/interfaces/ecpg/test/expected/connect-test3.stderr @@ -4,29 +4,29 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 27: QUERY: select current_database () with 0 parameter on connection second +[NO_PID]: ecpg_execute line 27: QUERY: select current_database () with 0 parameter on connection second [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 27: using PQexec +[NO_PID]: ecpg_execute line 27: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 27: Correctly got 1 tuples with 1 fields +[NO_PID]: ecpg_execute line 27: Correctly got 1 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 27: RESULT: regress1 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 27: RESULT: regress1 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection second closed. [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 31: QUERY: select current_database () with 0 parameter on connection first +[NO_PID]: ecpg_execute line 31: QUERY: select current_database () with 0 parameter on connection first [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 31: using PQexec +[NO_PID]: ecpg_execute line 31: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 31: Correctly got 1 tuples with 1 fields +[NO_PID]: ecpg_execute line 31: Correctly got 1 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 31: RESULT: connectdb offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 31: RESULT: connectdb offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on port [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: raising sqlcode -220 in line 35, 'No such connection DEFAULT in line 35.'. [NO_PID]: sqlca: code: -220, state: 08003 -[NO_PID]: connect: connection identifier second is already in use +[NO_PID]: ECPGconnect: connection identifier second is already in use [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection second closed. [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/connect-test5.stderr b/src/interfaces/ecpg/test/expected/connect-test5.stderr index f72f468f91..ef5676974c 100644 --- a/src/interfaces/ecpg/test/expected/connect-test5.stderr +++ b/src/interfaces/ecpg/test/expected/connect-test5.stderr @@ -2,11 +2,11 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database connectdb on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 23: QUERY: alter user connectuser encrypted password 'connectpw' with 0 parameter on connection main +[NO_PID]: ecpg_execute line 23: QUERY: alter user connectuser encrypted password 'connectpw' with 0 parameter on connection main [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 23: using PQexec +[NO_PID]: ecpg_execute line 23: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 23 Ok: ALTER ROLE +[NO_PID]: ecpg_execute line 23 Ok: ALTER ROLE [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection main closed. [NO_PID]: sqlca: code: 0, state: 00000 @@ -46,7 +46,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection main closed. [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: connect: non-localhost access via sockets in line 55 +[NO_PID]: ECPGconnect: non-localhost access via sockets in line 55 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: raising sqlcode -402 in line 55, 'Could not connect to database connectdb in line 55.'. [NO_PID]: sqlca: code: -402, state: 08001 @@ -58,7 +58,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database connectdb on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: connect: connection identifier main is already in use +[NO_PID]: ECPGconnect: connection identifier main is already in use [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection main closed. [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.stderr b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.stderr index 8678608bfd..fbb63c3ed2 100644 --- a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.stderr +++ b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.stderr @@ -2,39 +2,39 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 29: QUERY: create table date_test ( d date , ts timestamp ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 29: QUERY: create table date_test ( d date , ts timestamp ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 29: using PQexec +[NO_PID]: ecpg_execute line 29: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 29 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 29 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 30: QUERY: set datestyle to iso with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 30: QUERY: set datestyle to iso with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 30: using PQexec +[NO_PID]: ecpg_execute line 30: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 30 Ok: SET +[NO_PID]: ecpg_execute line 30 Ok: SET [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: QUERY: insert into date_test ( d , ts ) values ( $1 , $2 ) with 2 parameter on connection regress1 +[NO_PID]: ecpg_execute line 35: QUERY: insert into date_test ( d , ts ) values ( $1 , $2 ) with 2 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: using PQexecParams +[NO_PID]: ecpg_execute line 35: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: parameter 1 = 1966-01-17 +[NO_PID]: free_params line 35: parameter 1 = 1966-01-17 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: parameter 2 = 2000-07-12 17:34:29 +[NO_PID]: free_params line 35: parameter 2 = 2000-07-12 17:34:29 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 35 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 37: QUERY: select * from date_test where d = $1 with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 37: QUERY: select * from date_test where d = $1 with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 37: using PQexecParams +[NO_PID]: ecpg_execute line 37: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 37: parameter 1 = 1966-01-17 +[NO_PID]: free_params line 37: parameter 1 = 1966-01-17 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 37: Correctly got 1 tuples with 2 fields +[NO_PID]: ecpg_execute line 37: Correctly got 1 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 37: RESULT: 1966-01-17 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 37: RESULT: 1966-01-17 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 37: RESULT: 2000-07-12 17:34:29 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 37: RESULT: 2000-07-12 17:34:29 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 350 action = rollback connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.stderr b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.stderr index 242cb33f52..6740e84c64 100644 --- a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.stderr +++ b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.stderr @@ -4,27 +4,27 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGsetcommit line 34 action = off connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: QUERY: create table test ( text char ( 5 ) , num numeric ( 14 , 7 ) ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 35: QUERY: create table test ( text char ( 5 ) , num numeric ( 14 , 7 ) ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: using PQexec +[NO_PID]: ecpg_execute line 35: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 35 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 60: QUERY: insert into test ( text , num ) values ( 'test' , $1 ) with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 60: QUERY: insert into test ( text , num ) values ( 'test' , $1 ) with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 60: using PQexecParams +[NO_PID]: ecpg_execute line 60: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 60: parameter 1 = 2369.7 +[NO_PID]: free_params line 60: parameter 1 = 2369.7 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 60 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 60 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 66: QUERY: select num from test where text = 'test' with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 66: QUERY: select num from test where text = 'test' with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 66: using PQexec +[NO_PID]: ecpg_execute line 66: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 66: Correctly got 1 tuples with 1 fields +[NO_PID]: ecpg_execute line 66: Correctly got 1 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 66: RESULT: 2369.7000000 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 66: RESULT: 2369.7000000 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 90 action = rollback connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/preproc-array_of_struct.stderr b/src/interfaces/ecpg/test/expected/preproc-array_of_struct.stderr index 5326b1ea56..530489f61d 100644 --- a/src/interfaces/ecpg/test/expected/preproc-array_of_struct.stderr +++ b/src/interfaces/ecpg/test/expected/preproc-array_of_struct.stderr @@ -2,75 +2,75 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 51: QUERY: create table customers ( c varchar ( 50 ) , p int ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 51: QUERY: create table customers ( c varchar ( 50 ) , p int ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 51: using PQexec +[NO_PID]: ecpg_execute line 51: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 51 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 51 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: QUERY: insert into customers values ( 'John Doe' , '12345' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 52: QUERY: insert into customers values ( 'John Doe' , '12345' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: using PQexec +[NO_PID]: ecpg_execute line 52: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 52 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 53: QUERY: insert into customers values ( 'Jane Doe' , '67890' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 53: QUERY: insert into customers values ( 'Jane Doe' , '67890' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 53: using PQexec +[NO_PID]: ecpg_execute line 53: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 53 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 53 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 55: QUERY: select * from customers limit 2 with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 55: QUERY: select * from customers limit 2 with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 55: using PQexec +[NO_PID]: ecpg_execute line 55: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 55: Correctly got 2 tuples with 2 fields +[NO_PID]: ecpg_execute line 55: Correctly got 2 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 55: RESULT: John Doe offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 55: RESULT: John Doe offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 55: RESULT: Jane Doe offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 55: RESULT: Jane Doe offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 55: RESULT: 12345 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 55: RESULT: 12345 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 55: RESULT: 67890 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 55: RESULT: 67890 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 63: QUERY: select * from customers limit 2 with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 63: QUERY: select * from customers limit 2 with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 63: using PQexec +[NO_PID]: ecpg_execute line 63: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 63: Correctly got 2 tuples with 2 fields +[NO_PID]: ecpg_execute line 63: Correctly got 2 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 63: RESULT: John Doe offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 63: RESULT: John Doe offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 63: RESULT: Jane Doe offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 63: RESULT: Jane Doe offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 63: RESULT: 12345 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 63: RESULT: 12345 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 63: RESULT: 67890 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 63: RESULT: 67890 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 71: QUERY: select * from customers limit 2 with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 71: QUERY: select * from customers limit 2 with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 71: using PQexec +[NO_PID]: ecpg_execute line 71: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 71: Correctly got 2 tuples with 2 fields +[NO_PID]: ecpg_execute line 71: Correctly got 2 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: John Doe offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: John Doe offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: Jane Doe offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: Jane Doe offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: 12345 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: 12345 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: 67890 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: 67890 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 79: QUERY: select * from customers limit 1 with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 79: QUERY: select * from customers limit 1 with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 79: using PQexec +[NO_PID]: ecpg_execute line 79: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 79: Correctly got 1 tuples with 2 fields +[NO_PID]: ecpg_execute line 79: Correctly got 1 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 79: RESULT: John Doe offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 79: RESULT: John Doe offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 79: RESULT: 12345 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 79: RESULT: 12345 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection regress1 closed. [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/preproc-autoprep.stderr b/src/interfaces/ecpg/test/expected/preproc-autoprep.stderr index 68d7ff659c..36f64ddd0c 100644 --- a/src/interfaces/ecpg/test/expected/preproc-autoprep.stderr +++ b/src/interfaces/ecpg/test/expected/preproc-autoprep.stderr @@ -2,115 +2,115 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGauto_prepare line 19: stmt not in cache; inserting +[NO_PID]: ecpg_auto_prepare line 19: stmt not in cache; inserting [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGprepare line 19: NAME: ecpg1 QUERY: create table T ( Item1 int , Item2 int ) [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 19: QUERY: create table T ( Item1 int , Item2 int ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 19: QUERY: create table T ( Item1 int , Item2 int ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 19: using PQexecPrepared for create table T ( Item1 int , Item2 int ) +[NO_PID]: ecpg_execute line 19: using PQexecPrepared for create table T ( Item1 int , Item2 int ) [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 19 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 19 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGauto_prepare line 21: stmt not in cache; inserting +[NO_PID]: ecpg_auto_prepare line 21: stmt not in cache; inserting [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGprepare line 21: NAME: ecpg2 QUERY: insert into T values ( 1 , null ) [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 21: QUERY: insert into T values ( 1 , null ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 21: QUERY: insert into T values ( 1 , null ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 21: using PQexecPrepared for insert into T values ( 1 , null ) +[NO_PID]: ecpg_execute line 21: using PQexecPrepared for insert into T values ( 1 , null ) [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 21 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 21 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGauto_prepare line 22: stmt not in cache; inserting +[NO_PID]: ecpg_auto_prepare line 22: stmt not in cache; inserting [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGprepare line 22: NAME: ecpg3 QUERY: insert into T values ( 1 , $1 ) [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 22: QUERY: insert into T values ( 1 , $1 ) with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 22: QUERY: insert into T values ( 1 , $1 ) with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 22: using PQexecPrepared for insert into T values ( 1 , $1 ) +[NO_PID]: ecpg_execute line 22: using PQexecPrepared for insert into T values ( 1 , $1 ) [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 22: parameter 1 = 1 +[NO_PID]: free_params line 22: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 22 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 22 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGauto_prepare line 24: stmt found in cache, entry 6248 +[NO_PID]: ecpg_auto_prepare line 24: stmt found in cache, entry 6248 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 24: QUERY: insert into T values ( 1 , $1 ) with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 24: QUERY: insert into T values ( 1 , $1 ) with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 24: using PQexecPrepared for insert into T values ( 1 , $1 ) +[NO_PID]: ecpg_execute line 24: using PQexecPrepared for insert into T values ( 1 , $1 ) [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 24: parameter 1 = 2 +[NO_PID]: free_params line 24: parameter 1 = 2 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 24 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 24 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGprepare line 25: NAME: i QUERY: insert into T values ( 1 , 2 ) [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: QUERY: insert into T values ( 1 , 2 ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 26: QUERY: insert into T values ( 1 , 2 ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: using PQexecPrepared for insert into T values ( 1 , 2 ) +[NO_PID]: ecpg_execute line 26: using PQexecPrepared for insert into T values ( 1 , 2 ) [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 26 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGauto_prepare line 28: stmt not in cache; inserting +[NO_PID]: ecpg_auto_prepare line 28: stmt not in cache; inserting [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGprepare line 28: NAME: ecpg4 QUERY: select Item2 from T order by Item2 nulls last [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 28: QUERY: select Item2 from T order by Item2 nulls last with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 28: QUERY: select Item2 from T order by Item2 nulls last with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 28: using PQexecPrepared for select Item2 from T order by Item2 nulls last +[NO_PID]: ecpg_execute line 28: using PQexecPrepared for select Item2 from T order by Item2 nulls last [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 28: Correctly got 4 tuples with 1 fields +[NO_PID]: ecpg_execute line 28: Correctly got 4 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 28: RESULT: 1 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 28: RESULT: 1 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 28: RESULT: 2 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 28: RESULT: 2 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 28: RESULT: 2 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 28: RESULT: 2 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 28: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 28: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGauto_prepare line 35: stmt not in cache; inserting +[NO_PID]: ecpg_auto_prepare line 35: stmt not in cache; inserting [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGprepare line 35: NAME: ecpg5 QUERY: declare C cursor for select Item1 from T [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: QUERY: declare C cursor for select Item1 from T with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 35: QUERY: declare C cursor for select Item1 from T with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: using PQexecPrepared for declare C cursor for select Item1 from T +[NO_PID]: ecpg_execute line 35: using PQexecPrepared for declare C cursor for select Item1 from T [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35 Ok: DECLARE CURSOR +[NO_PID]: ecpg_execute line 35 Ok: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGauto_prepare line 37: stmt not in cache; inserting +[NO_PID]: ecpg_auto_prepare line 37: stmt not in cache; inserting [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGprepare line 37: NAME: ecpg6 QUERY: fetch 1 in C [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 37: QUERY: fetch 1 in C with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 37: QUERY: fetch 1 in C with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 37: using PQexecPrepared for fetch 1 in C +[NO_PID]: ecpg_execute line 37: using PQexecPrepared for fetch 1 in C [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 37: Correctly got 1 tuples with 1 fields +[NO_PID]: ecpg_execute line 37: Correctly got 1 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 37: RESULT: 1 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 37: RESULT: 1 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGauto_prepare line 40: stmt not in cache; inserting +[NO_PID]: ecpg_auto_prepare line 40: stmt not in cache; inserting [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGprepare line 40: NAME: ecpg7 QUERY: close C [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 40: QUERY: close C with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 40: QUERY: close C with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 40: using PQexecPrepared for close C +[NO_PID]: ecpg_execute line 40: using PQexecPrepared for close C [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 40 Ok: CLOSE CURSOR +[NO_PID]: ecpg_execute line 40 Ok: CLOSE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGauto_prepare line 42: stmt not in cache; inserting +[NO_PID]: ecpg_auto_prepare line 42: stmt not in cache; inserting [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGprepare line 42: NAME: ecpg8 QUERY: drop table T [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 42: QUERY: drop table T with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 42: QUERY: drop table T with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 42: using PQexecPrepared for drop table T +[NO_PID]: ecpg_execute line 42: using PQexecPrepared for drop table T [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 42 Ok: DROP TABLE +[NO_PID]: ecpg_execute line 42 Ok: DROP TABLE [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGdeallocate line 0: NAME: ecpg8 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/preproc-define.stderr b/src/interfaces/ecpg/test/expected/preproc-define.stderr index 951501c3e4..0ad40064fc 100644 --- a/src/interfaces/ecpg/test/expected/preproc-define.stderr +++ b/src/interfaces/ecpg/test/expected/preproc-define.stderr @@ -2,51 +2,51 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 36: QUERY: create table test ( name char ( 8 ) , amount int , letter char ( 1 ) ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 36: QUERY: create table test ( name char ( 8 ) , amount int , letter char ( 1 ) ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 36: using PQexec +[NO_PID]: ecpg_execute line 36: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 36 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 36 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 37 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 39: QUERY: insert into Test ( name , amount , letter ) values ( 'false' , 1 , 'f' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 39: QUERY: insert into Test ( name , amount , letter ) values ( 'false' , 1 , 'f' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 39: using PQexec +[NO_PID]: ecpg_execute line 39: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 39 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 39 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 40: QUERY: insert into test ( name , amount , letter ) values ( 'true' , 2 , 't' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 40: QUERY: insert into test ( name , amount , letter ) values ( 'true' , 2 , 't' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 40: using PQexec +[NO_PID]: ecpg_execute line 40: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 40 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 40 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 41 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 43: QUERY: select * from test with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 43: QUERY: select * from test with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 43: using PQexec +[NO_PID]: ecpg_execute line 43: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 43: Correctly got 2 tuples with 3 fields +[NO_PID]: ecpg_execute line 43: Correctly got 2 tuples with 3 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 43: RESULT: false offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 43: RESULT: false offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 43: RESULT: true offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 43: RESULT: true offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 43: RESULT: 1 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 43: RESULT: 1 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 43: RESULT: 2 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 43: RESULT: 2 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 43: RESULT: f offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 43: RESULT: f offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 43: RESULT: t offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 43: RESULT: t offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 56: QUERY: drop table test with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 56: QUERY: drop table test with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 56: using PQexec +[NO_PID]: ecpg_execute line 56: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 56 Ok: DROP TABLE +[NO_PID]: ecpg_execute line 56 Ok: DROP TABLE [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 57 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/preproc-type.stderr b/src/interfaces/ecpg/test/expected/preproc-type.stderr index 960695af30..a635119b1a 100644 --- a/src/interfaces/ecpg/test/expected/preproc-type.stderr +++ b/src/interfaces/ecpg/test/expected/preproc-type.stderr @@ -2,39 +2,39 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 50: QUERY: create table empl ( idnum integer , name char ( 20 ) , accs smallint , string1 char ( 10 ) , string2 char ( 10 ) , string3 char ( 10 ) ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 50: QUERY: create table empl ( idnum integer , name char ( 20 ) , accs smallint , string1 char ( 10 ) , string2 char ( 10 ) , string3 char ( 10 ) ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 50: using PQexec +[NO_PID]: ecpg_execute line 50: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 50 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 50 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 58: QUERY: insert into empl values ( 1 , 'user name' , 320 , 'first str' , 'second str' , 'third str' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 58: QUERY: insert into empl values ( 1 , 'user name' , 320 , 'first str' , 'second str' , 'third str' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 58: using PQexec +[NO_PID]: ecpg_execute line 58: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 58 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 58 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 65: QUERY: select idnum , name , accs , string1 , string2 , string3 from empl where idnum = $1 with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 65: QUERY: select idnum , name , accs , string1 , string2 , string3 from empl where idnum = $1 with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 65: using PQexecParams +[NO_PID]: ecpg_execute line 65: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 65: parameter 1 = 1 +[NO_PID]: free_params line 65: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 65: Correctly got 1 tuples with 6 fields +[NO_PID]: ecpg_execute line 65: Correctly got 1 tuples with 6 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 65: RESULT: 1 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 65: RESULT: 1 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 65: RESULT: user name offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 65: RESULT: user name offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 65: RESULT: 320 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 65: RESULT: 320 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 65: RESULT: first str offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 65: RESULT: first str offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGstore_result: line 65: allocating memory for 1 tuples +[NO_PID]: ecpg_store_result: line 65: allocating memory for 1 tuples [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 65: RESULT: second str offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 65: RESULT: second str offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 65: RESULT: third str offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 65: RESULT: third str offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection regress1 closed. [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/preproc-variable.stderr b/src/interfaces/ecpg/test/expected/preproc-variable.stderr index b113b0fbd4..7f792069b3 100644 --- a/src/interfaces/ecpg/test/expected/preproc-variable.stderr +++ b/src/interfaces/ecpg/test/expected/preproc-variable.stderr @@ -2,165 +2,165 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 46: QUERY: set datestyle to iso with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 46: QUERY: set datestyle to iso with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 46: using PQexec +[NO_PID]: ecpg_execute line 46: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 46 Ok: SET +[NO_PID]: ecpg_execute line 46 Ok: SET [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 49: QUERY: create table family ( name char ( 8 ) , born integer , age smallint , married date , children integer ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 49: QUERY: create table family ( name char ( 8 ) , born integer , age smallint , married date , children integer ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 49: using PQexec +[NO_PID]: ecpg_execute line 49: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 49 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 49 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: QUERY: insert into family ( name , married , children ) values ( 'Mum' , '19870714' , 3 ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 52: QUERY: insert into family ( name , married , children ) values ( 'Mum' , '19870714' , 3 ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: using PQexec +[NO_PID]: ecpg_execute line 52: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 52 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 53: QUERY: insert into family ( name , born , married , children ) values ( 'Dad' , '19610721' , '19870714' , 3 ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 53: QUERY: insert into family ( name , born , married , children ) values ( 'Dad' , '19610721' , '19870714' , 3 ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 53: using PQexec +[NO_PID]: ecpg_execute line 53: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 53 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 53 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 54: QUERY: insert into family ( name , age ) values ( 'Child 1' , 16 ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 54: QUERY: insert into family ( name , age ) values ( 'Child 1' , 16 ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 54: using PQexec +[NO_PID]: ecpg_execute line 54: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 54 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 54 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 55: QUERY: insert into family ( name , age ) values ( 'Child 2' , 14 ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 55: QUERY: insert into family ( name , age ) values ( 'Child 2' , 14 ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 55: using PQexec +[NO_PID]: ecpg_execute line 55: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 55 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 55 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 56: QUERY: insert into family ( name , age ) values ( 'Child 3' , 9 ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 56: QUERY: insert into family ( name , age ) values ( 'Child 3' , 9 ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 56: using PQexec +[NO_PID]: ecpg_execute line 56: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 56 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 56 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 59 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 62: QUERY: declare cur cursor for select name , born , age , married , children from family with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 62: QUERY: declare cur cursor for select name , born , age , married , children from family with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 62: using PQexec +[NO_PID]: ecpg_execute line 62: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 62 Ok: DECLARE CURSOR +[NO_PID]: ecpg_execute line 62 Ok: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 71: QUERY: fetch cur with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 71: QUERY: fetch cur with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 71: using PQexec +[NO_PID]: ecpg_execute line 71: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 71: Correctly got 1 tuples with 5 fields +[NO_PID]: ecpg_execute line 71: Correctly got 1 tuples with 5 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: Mum offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: Mum offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGstore_result: line 71: allocating memory for 1 tuples +[NO_PID]: ecpg_store_result: line 71: allocating memory for 1 tuples [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: 1987-07-14 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: 1987-07-14 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: 3 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: 3 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 71: QUERY: fetch cur with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 71: QUERY: fetch cur with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 71: using PQexec +[NO_PID]: ecpg_execute line 71: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 71: Correctly got 1 tuples with 5 fields +[NO_PID]: ecpg_execute line 71: Correctly got 1 tuples with 5 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: Dad offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: Dad offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: 19610721 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: 19610721 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGstore_result: line 71: allocating memory for 1 tuples +[NO_PID]: ecpg_store_result: line 71: allocating memory for 1 tuples [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: 1987-07-14 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: 1987-07-14 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: 3 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: 3 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 71: QUERY: fetch cur with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 71: QUERY: fetch cur with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 71: using PQexec +[NO_PID]: ecpg_execute line 71: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 71: Correctly got 1 tuples with 5 fields +[NO_PID]: ecpg_execute line 71: Correctly got 1 tuples with 5 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: Child 1 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: Child 1 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: 16 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: 16 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGstore_result: line 71: allocating memory for 1 tuples +[NO_PID]: ecpg_store_result: line 71: allocating memory for 1 tuples [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 71: QUERY: fetch cur with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 71: QUERY: fetch cur with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 71: using PQexec +[NO_PID]: ecpg_execute line 71: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 71: Correctly got 1 tuples with 5 fields +[NO_PID]: ecpg_execute line 71: Correctly got 1 tuples with 5 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: Child 2 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: Child 2 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: 14 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: 14 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGstore_result: line 71: allocating memory for 1 tuples +[NO_PID]: ecpg_store_result: line 71: allocating memory for 1 tuples [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 71: QUERY: fetch cur with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 71: QUERY: fetch cur with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 71: using PQexec +[NO_PID]: ecpg_execute line 71: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 71: Correctly got 1 tuples with 5 fields +[NO_PID]: ecpg_execute line 71: Correctly got 1 tuples with 5 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: Child 3 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: Child 3 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: 9 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: 9 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGstore_result: line 71: allocating memory for 1 tuples +[NO_PID]: ecpg_store_result: line 71: allocating memory for 1 tuples [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 71: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 71: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 71: QUERY: fetch cur with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 71: QUERY: fetch cur with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 71: using PQexec +[NO_PID]: ecpg_execute line 71: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 71: Correctly got 0 tuples with 5 fields +[NO_PID]: ecpg_execute line 71: Correctly got 0 tuples with 5 fields [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: raising sqlcode 100 in line 71, 'No data found in line 71.'. [NO_PID]: sqlca: code: 100, state: 02000 -[NO_PID]: ECPGexecute line 88: QUERY: close cur with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 88: QUERY: close cur with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 88: using PQexec +[NO_PID]: ecpg_execute line 88: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 88 Ok: CLOSE CURSOR +[NO_PID]: ecpg_execute line 88 Ok: CLOSE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 91: QUERY: drop table family with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 91: QUERY: drop table family with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 91: using PQexec +[NO_PID]: ecpg_execute line 91: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 91 Ok: DROP TABLE +[NO_PID]: ecpg_execute line 91 Ok: DROP TABLE [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 94 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/preproc-whenever.stderr b/src/interfaces/ecpg/test/expected/preproc-whenever.stderr index 63b925f704..d92c87bd36 100644 --- a/src/interfaces/ecpg/test/expected/preproc-whenever.stderr +++ b/src/interfaces/ecpg/test/expected/preproc-whenever.stderr @@ -2,47 +2,47 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 32: QUERY: create table test ( i int , c char ( 10 ) ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 32: QUERY: create table test ( i int , c char ( 10 ) ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 32: using PQexec +[NO_PID]: ecpg_execute line 32: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 32 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 32 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 33: QUERY: insert into test values ( 1 , 'abcdefghij' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 33: QUERY: insert into test values ( 1 , 'abcdefghij' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 33: using PQexec +[NO_PID]: ecpg_execute line 33: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 33 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 33 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 36: QUERY: select * from test with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 36: QUERY: select * from test with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 36: using PQexec +[NO_PID]: ecpg_execute line 36: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 36: Correctly got 1 tuples with 2 fields +[NO_PID]: ecpg_execute line 36: Correctly got 1 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 36: RESULT: 1 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 36: RESULT: 1 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 36: RESULT: abcdefghij offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 36: RESULT: abcdefghij offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 Warning: At least one column was truncated [NO_PID]: ECPGtrans line 37 action = rollback connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 39: QUERY: select * from nonexistant with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 39: QUERY: select * from nonexistant with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 39: using PQexec +[NO_PID]: ecpg_execute line 39: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGcheck_PQresult line 39: Error: ERROR: relation "nonexistant" does not exist +[NO_PID]: ecpg_check_PQresult line 39: Error: ERROR: relation "nonexistant" does not exist [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: raising sqlstate 42P01 (sqlcode: -400) in line 39, ''relation "nonexistant" does not exist' in line 39.'. [NO_PID]: sqlca: code: -400, state: 42P01 sql error 'relation "nonexistant" does not exist' in line 39. [NO_PID]: ECPGtrans line 40 action = rollback connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 43: QUERY: select * from nonexistant with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 43: QUERY: select * from nonexistant with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 43: using PQexec +[NO_PID]: ecpg_execute line 43: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGcheck_PQresult line 43: Error: ERROR: relation "nonexistant" does not exist +[NO_PID]: ecpg_check_PQresult line 43: Error: ERROR: relation "nonexistant" does not exist [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: raising sqlstate 42P01 (sqlcode: -400) in line 43, ''relation "nonexistant" does not exist' in line 43.'. [NO_PID]: sqlca: code: -400, state: 42P01 @@ -50,11 +50,11 @@ Error in statement 'select': sql error 'relation "nonexistant" does not exist' in line 43. [NO_PID]: ECPGtrans line 44 action = rollback connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 47: QUERY: select * from nonexistant with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 47: QUERY: select * from nonexistant with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 47: using PQexec +[NO_PID]: ecpg_execute line 47: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGcheck_PQresult line 47: Error: ERROR: relation "nonexistant" does not exist +[NO_PID]: ecpg_check_PQresult line 47: Error: ERROR: relation "nonexistant" does not exist [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: raising sqlstate 42P01 (sqlcode: -400) in line 47, ''relation "nonexistant" does not exist' in line 47.'. [NO_PID]: sqlca: code: -400, state: 42P01 @@ -62,31 +62,31 @@ Found another error sql error 'relation "nonexistant" does not exist' in line 47. [NO_PID]: ECPGtrans line 48 action = rollback connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 51: QUERY: select * from nonexistant with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 51: QUERY: select * from nonexistant with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 51: using PQexec +[NO_PID]: ecpg_execute line 51: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGcheck_PQresult line 51: Error: ERROR: relation "nonexistant" does not exist +[NO_PID]: ecpg_check_PQresult line 51: Error: ERROR: relation "nonexistant" does not exist [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: raising sqlstate 42P01 (sqlcode: -400) in line 51, ''relation "nonexistant" does not exist' in line 51.'. [NO_PID]: sqlca: code: -400, state: 42P01 [NO_PID]: ECPGtrans line 52 action = rollback connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 55: QUERY: select * from nonexistant with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 55: QUERY: select * from nonexistant with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 55: using PQexec +[NO_PID]: ecpg_execute line 55: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGcheck_PQresult line 55: Error: ERROR: relation "nonexistant" does not exist +[NO_PID]: ecpg_check_PQresult line 55: Error: ERROR: relation "nonexistant" does not exist [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: raising sqlstate 42P01 (sqlcode: -400) in line 55, ''relation "nonexistant" does not exist' in line 55.'. [NO_PID]: sqlca: code: -400, state: 42P01 [NO_PID]: ECPGtrans line 59 action = rollback connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 62: QUERY: select * from nonexistant with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 62: QUERY: select * from nonexistant with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 62: using PQexec +[NO_PID]: ecpg_execute line 62: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGcheck_PQresult line 62: Error: ERROR: relation "nonexistant" does not exist +[NO_PID]: ecpg_check_PQresult line 62: Error: ERROR: relation "nonexistant" does not exist [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: raising sqlstate 42P01 (sqlcode: -400) in line 62, ''relation "nonexistant" does not exist' in line 62.'. [NO_PID]: sqlca: code: -400, state: 42P01 diff --git a/src/interfaces/ecpg/test/expected/sql-array.stderr b/src/interfaces/ecpg/test/expected/sql-array.stderr index 949c996727..7a7edcbcef 100644 --- a/src/interfaces/ecpg/test/expected/sql-array.stderr +++ b/src/interfaces/ecpg/test/expected/sql-array.stderr @@ -6,83 +6,83 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 31 action = begin transaction connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 33: QUERY: create table test ( f float , i int , a int [ 10 ] , text char ( 10 ) ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 33: QUERY: create table test ( f float , i int , a int [ 10 ] , text char ( 10 ) ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 33: using PQexec +[NO_PID]: ecpg_execute line 33: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 33 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 33 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: QUERY: insert into test ( f , i , a , text ) values ( 404.90 , 3 , '{0,1,2,3,4,5,6,7,8,9}' , 'abcdefghij' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 35: QUERY: insert into test ( f , i , a , text ) values ( 404.90 , 3 , '{0,1,2,3,4,5,6,7,8,9}' , 'abcdefghij' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: using PQexec +[NO_PID]: ecpg_execute line 35: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 35 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 37: QUERY: insert into test ( f , i , a , text ) values ( 140787.0 , 2 , $1 , $2 ) with 2 parameter on connection regress1 +[NO_PID]: ecpg_execute line 37: QUERY: insert into test ( f , i , a , text ) values ( 140787.0 , 2 , $1 , $2 ) with 2 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 37: using PQexecParams +[NO_PID]: ecpg_execute line 37: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 37: parameter 1 = {9,8,7,6,5,4,3,2,1,0} +[NO_PID]: free_params line 37: parameter 1 = {9,8,7,6,5,4,3,2,1,0} [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 37: parameter 2 = klmnopqrst +[NO_PID]: free_params line 37: parameter 2 = klmnopqrst [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 37 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 37 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 39: QUERY: insert into test ( f , i , a , text ) values ( 14.07 , $1 , $2 , $3 ) with 3 parameter on connection regress1 +[NO_PID]: ecpg_execute line 39: QUERY: insert into test ( f , i , a , text ) values ( 14.07 , $1 , $2 , $3 ) with 3 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 39: using PQexecParams +[NO_PID]: ecpg_execute line 39: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 39: parameter 1 = 1 +[NO_PID]: free_params line 39: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 39: parameter 2 = {9,8,7,6,5,4,3,2,1,0} +[NO_PID]: free_params line 39: parameter 2 = {9,8,7,6,5,4,3,2,1,0} [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 39: parameter 3 = 0123456789 +[NO_PID]: free_params line 39: parameter 3 = 0123456789 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 39 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 39 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 41 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 43 action = begin transaction connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 45: QUERY: select f , text from test where i = 1 with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 45: QUERY: select f , text from test where i = 1 with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 45: using PQexec +[NO_PID]: ecpg_execute line 45: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 45: Correctly got 1 tuples with 2 fields +[NO_PID]: ecpg_execute line 45: Correctly got 1 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 45: RESULT: 14.07 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 45: RESULT: 14.07 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 45: RESULT: 0123456789 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 45: RESULT: 0123456789 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 53: QUERY: select a , text from test where f = $1 with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 53: QUERY: select a , text from test where f = $1 with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 53: using PQexecParams +[NO_PID]: ecpg_execute line 53: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 53: parameter 1 = 140787 +[NO_PID]: free_params line 53: parameter 1 = 140787 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 53: Correctly got 1 tuples with 2 fields +[NO_PID]: ecpg_execute line 53: Correctly got 1 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGis_type_an_array line 53: TYPE database: 1007 C: 5 array: Yes +[NO_PID]: ecpg_is_type_an_array line 53: TYPE database: 1007 C: 5 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: {9,8,7,6,5,4,3,2,1,0} offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: {9,8,7,6,5,4,3,2,1,0} offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: klmnopqrst offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: klmnopqrst offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 63: QUERY: select a from test where f = $1 with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 63: QUERY: select a from test where f = $1 with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 63: using PQexecParams +[NO_PID]: ecpg_execute line 63: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 63: parameter 1 = 140787 +[NO_PID]: free_params line 63: parameter 1 = 140787 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 63: Correctly got 1 tuples with 1 fields +[NO_PID]: ecpg_execute line 63: Correctly got 1 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 63: RESULT: {9,8,7,6,5,4,3,2,1,0} offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 63: RESULT: {9,8,7,6,5,4,3,2,1,0} offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 70: QUERY: drop table test with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 70: QUERY: drop table test with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 70: using PQexec +[NO_PID]: ecpg_execute line 70: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 70 Ok: DROP TABLE +[NO_PID]: ecpg_execute line 70 Ok: DROP TABLE [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 72 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-binary.stderr b/src/interfaces/ecpg/test/expected/sql-binary.stderr index 38b1bf29ff..b3378601f4 100644 --- a/src/interfaces/ecpg/test/expected/sql-binary.stderr +++ b/src/interfaces/ecpg/test/expected/sql-binary.stderr @@ -2,65 +2,65 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: QUERY: create table empl ( idnum integer , name char ( 20 ) , accs smallint , byte bytea ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 35: QUERY: create table empl ( idnum integer , name char ( 20 ) , accs smallint , byte bytea ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: using PQexec +[NO_PID]: ecpg_execute line 35: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 35 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 43: QUERY: insert into empl values ( 1 , 'first user' , 320 , $1 ) with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 43: QUERY: insert into empl values ( 1 , 'first user' , 320 , $1 ) with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 43: using PQexecParams +[NO_PID]: ecpg_execute line 43: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 43: parameter 1 = \001\155\000\212 +[NO_PID]: free_params line 43: parameter 1 = \001\155\000\212 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 43 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 43 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 51: QUERY: declare C cursor for select name , accs , byte from empl where idnum = $1 with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 51: QUERY: declare C cursor for select name , accs , byte from empl where idnum = $1 with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 51: using PQexecParams +[NO_PID]: ecpg_execute line 51: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 51: parameter 1 = 1 +[NO_PID]: free_params line 51: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 51 Ok: DECLARE CURSOR +[NO_PID]: ecpg_execute line 51 Ok: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: QUERY: fetch C with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 52: QUERY: fetch C with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: using PQexec +[NO_PID]: ecpg_execute line 52: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: Correctly got 1 tuples with 3 fields +[NO_PID]: ecpg_execute line 52: Correctly got 1 tuples with 3 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 52: RESULT: first user offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 52: RESULT: first user offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 52: RESULT: 320 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 52: RESULT: 320 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 52: RESULT: \001m\000\212 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 52: RESULT: \001m\000\212 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 64: QUERY: declare B binary cursor for select name , accs , byte from empl where idnum = $1 with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 64: QUERY: declare B binary cursor for select name , accs , byte from empl where idnum = $1 with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 64: using PQexecParams +[NO_PID]: ecpg_execute line 64: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 64: parameter 1 = 1 +[NO_PID]: free_params line 64: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 64 Ok: DECLARE CURSOR +[NO_PID]: ecpg_execute line 64 Ok: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 65: QUERY: fetch B with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 65: QUERY: fetch B with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 65: using PQexec +[NO_PID]: ecpg_execute line 65: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 65: Correctly got 1 tuples with 3 fields +[NO_PID]: ecpg_execute line 65: Correctly got 1 tuples with 3 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 65: RESULT: BINARY offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 65: RESULT: BINARY offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 65: RESULT: BINARY offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 65: RESULT: BINARY offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 65: RESULT: BINARY offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 65: RESULT: BINARY offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 72: QUERY: close B with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 72: QUERY: close B with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 72: using PQexec +[NO_PID]: ecpg_execute line 72: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 72 Ok: CLOSE CURSOR +[NO_PID]: ecpg_execute line 72 Ok: CLOSE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection regress1 closed. [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-code100.stderr b/src/interfaces/ecpg/test/expected/sql-code100.stderr index c3d90660c1..86813bc578 100644 --- a/src/interfaces/ecpg/test/expected/sql-code100.stderr +++ b/src/interfaces/ecpg/test/expected/sql-code100.stderr @@ -2,125 +2,125 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 18: QUERY: create table test ( "index" numeric ( 3 ) primary key , "payload" int4 not null ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 18: QUERY: create table test ( "index" numeric ( 3 ) primary key , "payload" int4 not null ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 18: using PQexec +[NO_PID]: ecpg_execute line 18: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 18 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 18 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 22 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , $1 ) with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 26: QUERY: insert into test ( payload , index ) values ( 0 , $1 ) with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: using PQexecParams +[NO_PID]: ecpg_execute line 26: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: parameter 1 = 0 +[NO_PID]: free_params line 26: parameter 1 = 0 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 26 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , $1 ) with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 26: QUERY: insert into test ( payload , index ) values ( 0 , $1 ) with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: using PQexecParams +[NO_PID]: ecpg_execute line 26: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: parameter 1 = 1 +[NO_PID]: free_params line 26: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 26 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , $1 ) with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 26: QUERY: insert into test ( payload , index ) values ( 0 , $1 ) with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: using PQexecParams +[NO_PID]: ecpg_execute line 26: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: parameter 1 = 2 +[NO_PID]: free_params line 26: parameter 1 = 2 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 26 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , $1 ) with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 26: QUERY: insert into test ( payload , index ) values ( 0 , $1 ) with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: using PQexecParams +[NO_PID]: ecpg_execute line 26: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: parameter 1 = 3 +[NO_PID]: free_params line 26: parameter 1 = 3 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 26 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , $1 ) with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 26: QUERY: insert into test ( payload , index ) values ( 0 , $1 ) with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: using PQexecParams +[NO_PID]: ecpg_execute line 26: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: parameter 1 = 4 +[NO_PID]: free_params line 26: parameter 1 = 4 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 26 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , $1 ) with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 26: QUERY: insert into test ( payload , index ) values ( 0 , $1 ) with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: using PQexecParams +[NO_PID]: ecpg_execute line 26: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: parameter 1 = 5 +[NO_PID]: free_params line 26: parameter 1 = 5 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 26 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , $1 ) with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 26: QUERY: insert into test ( payload , index ) values ( 0 , $1 ) with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: using PQexecParams +[NO_PID]: ecpg_execute line 26: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: parameter 1 = 6 +[NO_PID]: free_params line 26: parameter 1 = 6 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 26 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , $1 ) with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 26: QUERY: insert into test ( payload , index ) values ( 0 , $1 ) with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: using PQexecParams +[NO_PID]: ecpg_execute line 26: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: parameter 1 = 7 +[NO_PID]: free_params line 26: parameter 1 = 7 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 26 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , $1 ) with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 26: QUERY: insert into test ( payload , index ) values ( 0 , $1 ) with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: using PQexecParams +[NO_PID]: ecpg_execute line 26: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: parameter 1 = 8 +[NO_PID]: free_params line 26: parameter 1 = 8 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 26 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , $1 ) with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 26: QUERY: insert into test ( payload , index ) values ( 0 , $1 ) with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: using PQexecParams +[NO_PID]: ecpg_execute line 26: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: parameter 1 = 9 +[NO_PID]: free_params line 26: parameter 1 = 9 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 26 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 31 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 34: QUERY: update test set payload = payload + 1 where index = - 1 with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 34: QUERY: update test set payload = payload + 1 where index = - 1 with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 34: using PQexec +[NO_PID]: ecpg_execute line 34: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 34 Ok: UPDATE 0 +[NO_PID]: ecpg_execute line 34 Ok: UPDATE 0 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: raising sqlcode 100 in line 34, 'No data found in line 34.'. [NO_PID]: sqlca: code: 100, state: 02000 -[NO_PID]: ECPGexecute line 38: QUERY: delete from test where index = - 1 with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 38: QUERY: delete from test where index = - 1 with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 38: using PQexec +[NO_PID]: ecpg_execute line 38: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 38 Ok: DELETE 0 +[NO_PID]: ecpg_execute line 38 Ok: DELETE 0 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: raising sqlcode 100 in line 38, 'No data found in line 38.'. [NO_PID]: sqlca: code: 100, state: 02000 -[NO_PID]: ECPGexecute line 41: QUERY: insert into test ( select * from test where index = - 1 ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 41: QUERY: insert into test ( select * from test where index = - 1 ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 41: using PQexec +[NO_PID]: ecpg_execute line 41: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 41 Ok: INSERT 0 0 +[NO_PID]: ecpg_execute line 41 Ok: INSERT 0 0 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: raising sqlcode 100 in line 41, 'No data found in line 41.'. [NO_PID]: sqlca: code: 100, state: 02000 -[NO_PID]: ECPGexecute line 44: QUERY: drop table test with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 44: QUERY: drop table test with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 44: using PQexec +[NO_PID]: ecpg_execute line 44: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 44 Ok: DROP TABLE +[NO_PID]: ecpg_execute line 44 Ok: DROP TABLE [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 46 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-copystdout.stderr b/src/interfaces/ecpg/test/expected/sql-copystdout.stderr index 3c86e1b603..fd677ac6f3 100644 --- a/src/interfaces/ecpg/test/expected/sql-copystdout.stderr +++ b/src/interfaces/ecpg/test/expected/sql-copystdout.stderr @@ -2,37 +2,37 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 20: QUERY: create table foo ( a int , b varchar ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 20: QUERY: create table foo ( a int , b varchar ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 20: using PQexec +[NO_PID]: ecpg_execute line 20: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 20 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 20 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 21: QUERY: insert into foo values ( 5 , 'abc' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 21: QUERY: insert into foo values ( 5 , 'abc' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 21: using PQexec +[NO_PID]: ecpg_execute line 21: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 21 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 21 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 22: QUERY: insert into foo values ( 6 , 'def' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 22: QUERY: insert into foo values ( 6 , 'def' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 22: using PQexec +[NO_PID]: ecpg_execute line 22: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 22 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 22 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 23: QUERY: insert into foo values ( 7 , 'ghi' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 23: QUERY: insert into foo values ( 7 , 'ghi' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 23: using PQexec +[NO_PID]: ecpg_execute line 23: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 23 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 23 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 29: QUERY: copy foo to stdout with delimiter ',' with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 29: QUERY: copy foo to stdout with delimiter ',' with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 29: using PQexec +[NO_PID]: ecpg_execute line 29: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 29: Got PGRES_COPY_OUT +[NO_PID]: ecpg_execute line 29: Got PGRES_COPY_OUT [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 29: Got PGRES_COMMAND_OK after PGRES_COPY_OUT +[NO_PID]: ecpg_execute line 29: Got PGRES_COMMAND_OK after PGRES_COPY_OUT [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection regress1 closed. [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-define.stderr b/src/interfaces/ecpg/test/expected/sql-define.stderr index dd9d25e0e7..ebfa8070d4 100644 --- a/src/interfaces/ecpg/test/expected/sql-define.stderr +++ b/src/interfaces/ecpg/test/expected/sql-define.stderr @@ -2,51 +2,51 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 19: QUERY: create table test ( a int , b text ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 19: QUERY: create table test ( a int , b text ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 19: using PQexec +[NO_PID]: ecpg_execute line 19: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 19 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 19 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 20: QUERY: insert into test values ( 29 , 'abcdef' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 20: QUERY: insert into test values ( 29 , 'abcdef' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 20: using PQexec +[NO_PID]: ecpg_execute line 20: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 20 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 20 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 23: QUERY: insert into test values ( null , 'defined' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 23: QUERY: insert into test values ( null , 'defined' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 23: using PQexec +[NO_PID]: ecpg_execute line 23: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 23 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 23 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 31: QUERY: insert into test values ( null , 'someothervar not defined' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 31: QUERY: insert into test values ( null , 'someothervar not defined' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 31: using PQexec +[NO_PID]: ecpg_execute line 31: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 31 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 31 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 36: QUERY: select 1 , 29 :: text || '-' || 'abcdef' with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 36: QUERY: select 1 , 29 :: text || '-' || 'abcdef' with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 36: using PQexec +[NO_PID]: ecpg_execute line 36: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 36: Correctly got 1 tuples with 2 fields +[NO_PID]: ecpg_execute line 36: Correctly got 1 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 36: RESULT: 1 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 36: RESULT: 1 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 36: RESULT: 29-abcdef offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 36: RESULT: 29-abcdef offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 42: QUERY: insert into test values ( 29 , 'no string' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 42: QUERY: insert into test values ( 29 , 'no string' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 42: using PQexec +[NO_PID]: ecpg_execute line 42: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 42 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 42 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 53: QUERY: set TIMEZONE to 'UTC' with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 53: QUERY: set TIMEZONE to 'UTC' with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 53: using PQexec +[NO_PID]: ecpg_execute line 53: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 53 Ok: SET +[NO_PID]: ecpg_execute line 53 Ok: SET [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection regress1 closed. [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-desc.stderr b/src/interfaces/ecpg/test/expected/sql-desc.stderr index d6175b94a3..331b5c4bab 100644 --- a/src/interfaces/ecpg/test/expected/sql-desc.stderr +++ b/src/interfaces/ecpg/test/expected/sql-desc.stderr @@ -2,11 +2,11 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 29: QUERY: create table test1 ( a int , b text ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 29: QUERY: create table test1 ( a int , b text ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 29: using PQexec +[NO_PID]: ecpg_execute line 29: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 29 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 29 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGprepare line 30: NAME: foo1 QUERY: INSERT INTO test1 VALUES ($1, $2) [NO_PID]: sqlca: code: 0, state: 00000 @@ -16,119 +16,119 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGprepare line 33: NAME: foo3 QUERY: SELECT * from test1 where $1 = a [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: QUERY: INSERT INTO test1 VALUES ($1, $2) with 2 parameter on connection regress1 +[NO_PID]: ecpg_execute line 35: QUERY: INSERT INTO test1 VALUES ($1, $2) with 2 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: using PQexecPrepared for INSERT INTO test1 VALUES ($1, $2) +[NO_PID]: ecpg_execute line 35: using PQexecPrepared for INSERT INTO test1 VALUES ($1, $2) [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: parameter 1 = 1 +[NO_PID]: free_params line 35: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: parameter 2 = one +[NO_PID]: free_params line 35: parameter 2 = one [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 35 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 40: QUERY: INSERT INTO test1 VALUES ($1, $2) with 2 parameter on connection regress1 +[NO_PID]: ecpg_execute line 40: QUERY: INSERT INTO test1 VALUES ($1, $2) with 2 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 40: using PQexecPrepared for INSERT INTO test1 VALUES ($1, $2) +[NO_PID]: ecpg_execute line 40: using PQexecPrepared for INSERT INTO test1 VALUES ($1, $2) [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 40: parameter 1 = 2 +[NO_PID]: free_params line 40: parameter 1 = 2 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 40: parameter 2 = null +[NO_PID]: free_params line 40: parameter 2 = null [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 40 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 40 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 45: QUERY: INSERT INTO test1 VALUES ($1, $2) with 2 parameter on connection regress1 +[NO_PID]: ecpg_execute line 45: QUERY: INSERT INTO test1 VALUES ($1, $2) with 2 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 45: using PQexecPrepared for INSERT INTO test1 VALUES ($1, $2) +[NO_PID]: ecpg_execute line 45: using PQexecPrepared for INSERT INTO test1 VALUES ($1, $2) [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 45: parameter 1 = 3 +[NO_PID]: free_params line 45: parameter 1 = 3 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 45: parameter 2 = this is a long test +[NO_PID]: free_params line 45: parameter 2 = this is a long test [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 45 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 45 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGdeallocate line 47: NAME: Foo-1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: QUERY: SELECT * from test1 where a = $1 and b = $2 with 2 parameter on connection regress1 +[NO_PID]: ecpg_execute line 52: QUERY: SELECT * from test1 where a = $1 and b = $2 with 2 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: using PQexecPrepared for SELECT * from test1 where a = $1 and b = $2 +[NO_PID]: ecpg_execute line 52: using PQexecPrepared for SELECT * from test1 where a = $1 and b = $2 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: parameter 1 = 1 +[NO_PID]: free_params line 52: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: parameter 2 = one +[NO_PID]: free_params line 52: parameter 2 = one [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: Correctly got 1 tuples with 2 fields +[NO_PID]: ecpg_execute line 52: Correctly got 1 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute putting result (1 tuples) into descriptor 'outdesc' +[NO_PID]: ecpg_execute putting result (1 tuples) into descriptor 'outdesc' [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 54: RESULT: 1 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 54: RESULT: 1 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 58: QUERY: declare c1 cursor for SELECT * from test1 where a = $1 and b = $2 with 2 parameter on connection regress1 +[NO_PID]: ecpg_execute line 58: QUERY: declare c1 cursor for SELECT * from test1 where a = $1 and b = $2 with 2 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 58: using PQexecParams +[NO_PID]: ecpg_execute line 58: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 58: parameter 1 = 1 +[NO_PID]: free_params line 58: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 58: parameter 2 = one +[NO_PID]: free_params line 58: parameter 2 = one [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 58 Ok: DECLARE CURSOR +[NO_PID]: ecpg_execute line 58 Ok: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 60: QUERY: fetch next from c1 with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 60: QUERY: fetch next from c1 with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 60: using PQexec +[NO_PID]: ecpg_execute line 60: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 60: Correctly got 1 tuples with 2 fields +[NO_PID]: ecpg_execute line 60: Correctly got 1 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 60: RESULT: 1 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 60: RESULT: 1 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 60: RESULT: one offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 60: RESULT: one offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 64: QUERY: close c1 with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 64: QUERY: close c1 with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 64: using PQexec +[NO_PID]: ecpg_execute line 64: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 64 Ok: CLOSE CURSOR +[NO_PID]: ecpg_execute line 64 Ok: CLOSE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 70: QUERY: declare c2 cursor for SELECT * from test1 where $1 = a with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 70: QUERY: declare c2 cursor for SELECT * from test1 where $1 = a with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 70: using PQexecParams +[NO_PID]: ecpg_execute line 70: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 70: parameter 1 = 2 +[NO_PID]: free_params line 70: parameter 1 = 2 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 70 Ok: DECLARE CURSOR +[NO_PID]: ecpg_execute line 70 Ok: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 72: QUERY: fetch next from c2 with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 72: QUERY: fetch next from c2 with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 72: using PQexec +[NO_PID]: ecpg_execute line 72: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 72: Correctly got 1 tuples with 2 fields +[NO_PID]: ecpg_execute line 72: Correctly got 1 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 72: RESULT: 2 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 72: RESULT: 2 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 72: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 72: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 75: QUERY: close c2 with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 75: QUERY: close c2 with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 75: using PQexec +[NO_PID]: ecpg_execute line 75: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 75 Ok: CLOSE CURSOR +[NO_PID]: ecpg_execute line 75 Ok: CLOSE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 77: QUERY: select * from test1 where a = 3 with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 77: QUERY: select * from test1 where a = 3 with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 77: using PQexec +[NO_PID]: ecpg_execute line 77: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 77: Correctly got 1 tuples with 2 fields +[NO_PID]: ecpg_execute line 77: Correctly got 1 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 77: RESULT: 3 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 77: RESULT: 3 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 77: RESULT: this is a long test offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 77: RESULT: this is a long test offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 80: QUERY: drop table test1 with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 80: QUERY: drop table test1 with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 80: using PQexec +[NO_PID]: ecpg_execute line 80: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 80 Ok: DROP TABLE +[NO_PID]: ecpg_execute line 80 Ok: DROP TABLE [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGdeallocate line 81: NAME: foo3 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-dynalloc.stderr b/src/interfaces/ecpg/test/expected/sql-dynalloc.stderr index 9d0af4c8d4..0471f07df1 100644 --- a/src/interfaces/ecpg/test/expected/sql-dynalloc.stderr +++ b/src/interfaces/ecpg/test/expected/sql-dynalloc.stderr @@ -2,101 +2,101 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: QUERY: set datestyle to mdy with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 35: QUERY: set datestyle to mdy with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: using PQexec +[NO_PID]: ecpg_execute line 35: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35 Ok: SET +[NO_PID]: ecpg_execute line 35 Ok: SET [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 37: QUERY: create table test ( a serial , b numeric ( 12 , 3 ) , c varchar , d varchar ( 3 ) , e char ( 4 ) , f timestamptz , g boolean , h box , i inet ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 37: QUERY: create table test ( a serial , b numeric ( 12 , 3 ) , c varchar , d varchar ( 3 ) , e char ( 4 ) , f timestamptz , g boolean , h box , i inet ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 37: using PQexec +[NO_PID]: ecpg_execute line 37: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 37 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 37 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 38: QUERY: insert into test ( b , c , d , e , f , g , h , i ) values ( 23.456 , 'varchar' , 'v' , 'c' , '2003-03-03 12:33:07 PDT' , true , '(1,2,3,4)' , '2001:4f8:3:ba:2e0:81ff:fe22:d1f1/128' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 38: QUERY: insert into test ( b , c , d , e , f , g , h , i ) values ( 23.456 , 'varchar' , 'v' , 'c' , '2003-03-03 12:33:07 PDT' , true , '(1,2,3,4)' , '2001:4f8:3:ba:2e0:81ff:fe22:d1f1/128' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 38: using PQexec +[NO_PID]: ecpg_execute line 38: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 38 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 38 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 39: QUERY: insert into test ( b , c , d , e , f , g , h , i ) values ( 2.446456 , null , 'v' , 'c' , '2003-03-03 12:33:07 PDT' , false , null , null ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 39: QUERY: insert into test ( b , c , d , e , f , g , h , i ) values ( 2.446456 , null , 'v' , 'c' , '2003-03-03 12:33:07 PDT' , false , null , null ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 39: using PQexec +[NO_PID]: ecpg_execute line 39: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 39 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 39 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 42: QUERY: select a , b , c , d , e , f , g , h , i from test order by a with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 42: QUERY: select a , b , c , d , e , f , g , h , i from test order by a with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 42: using PQexec +[NO_PID]: ecpg_execute line 42: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 42: Correctly got 2 tuples with 9 fields +[NO_PID]: ecpg_execute line 42: Correctly got 2 tuples with 9 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute putting result (2 tuples) into descriptor 'mydesc' +[NO_PID]: ecpg_execute putting result (2 tuples) into descriptor 'mydesc' [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGstore_result: line 43: allocating memory for 2 tuples +[NO_PID]: ecpg_store_result: line 43: allocating memory for 2 tuples [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 43: RESULT: 1 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 43: RESULT: 1 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 43: RESULT: 2 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 43: RESULT: 2 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 2 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGstore_result: line 44: allocating memory for 2 tuples +[NO_PID]: ecpg_store_result: line 44: allocating memory for 2 tuples [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 44: RESULT: 23.456 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 44: RESULT: 23.456 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 44: RESULT: 2.446 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 44: RESULT: 2.446 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 3 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGstore_result: line 45: allocating memory for 2 tuples +[NO_PID]: ecpg_store_result: line 45: allocating memory for 2 tuples [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 45: RESULT: varchar offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 45: RESULT: varchar offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 45: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 45: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 4 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGstore_result: line 46: allocating memory for 2 tuples +[NO_PID]: ecpg_store_result: line 46: allocating memory for 2 tuples [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 46: RESULT: v offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 46: RESULT: v offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 46: RESULT: v offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 46: RESULT: v offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 5 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGstore_result: line 47: allocating memory for 2 tuples +[NO_PID]: ecpg_store_result: line 47: allocating memory for 2 tuples [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 47: RESULT: c offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 47: RESULT: c offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 47: RESULT: c offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 47: RESULT: c offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 6 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGstore_result: line 48: allocating memory for 2 tuples +[NO_PID]: ecpg_store_result: line 48: allocating memory for 2 tuples [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 48: RESULT: Mon Mar 03 11:33:07 2003 PST offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 48: RESULT: Mon Mar 03 11:33:07 2003 PST offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 48: RESULT: Mon Mar 03 11:33:07 2003 PST offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 48: RESULT: Mon Mar 03 11:33:07 2003 PST offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 7 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGstore_result: line 49: allocating memory for 2 tuples +[NO_PID]: ecpg_store_result: line 49: allocating memory for 2 tuples [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 49: RESULT: t offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 49: RESULT: t offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 49: RESULT: f offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 49: RESULT: f offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 9 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGstore_result: line 52: allocating memory for 2 tuples +[NO_PID]: ecpg_store_result: line 52: allocating memory for 2 tuples [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 52: RESULT: 2001:4f8:3:ba:2e0:81ff:fe22:d1f1 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 52: RESULT: 2001:4f8:3:ba:2e0:81ff:fe22:d1f1 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 52: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 52: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection regress1 closed. [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-dynalloc2.stderr b/src/interfaces/ecpg/test/expected/sql-dynalloc2.stderr index c39524c5be..0c52d64c34 100644 --- a/src/interfaces/ecpg/test/expected/sql-dynalloc2.stderr +++ b/src/interfaces/ecpg/test/expected/sql-dynalloc2.stderr @@ -2,95 +2,95 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 22: QUERY: set datestyle to postgres with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 22: QUERY: set datestyle to postgres with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 22: using PQexec +[NO_PID]: ecpg_execute line 22: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 22 Ok: SET +[NO_PID]: ecpg_execute line 22 Ok: SET [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 24: QUERY: create table test ( a int , b text ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 24: QUERY: create table test ( a int , b text ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 24: using PQexec +[NO_PID]: ecpg_execute line 24: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 24 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 24 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 25: QUERY: insert into test values ( 1 , 'one' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 25: QUERY: insert into test values ( 1 , 'one' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 25: using PQexec +[NO_PID]: ecpg_execute line 25: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 25 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 25 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: QUERY: insert into test values ( 2 , 'two' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 26: QUERY: insert into test values ( 2 , 'two' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: using PQexec +[NO_PID]: ecpg_execute line 26: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 26 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 27: QUERY: insert into test values ( null , 'three' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 27: QUERY: insert into test values ( null , 'three' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 27: using PQexec +[NO_PID]: ecpg_execute line 27: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 27 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 27 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 28: QUERY: insert into test values ( 4 , 'four' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 28: QUERY: insert into test values ( 4 , 'four' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 28: using PQexec +[NO_PID]: ecpg_execute line 28: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 28 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 28 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 29: QUERY: insert into test values ( 5 , null ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 29: QUERY: insert into test values ( 5 , null ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 29: using PQexec +[NO_PID]: ecpg_execute line 29: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 29 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 29 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 30: QUERY: insert into test values ( null , null ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 30: QUERY: insert into test values ( null , null ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 30: using PQexec +[NO_PID]: ecpg_execute line 30: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 30 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 30 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 33: QUERY: select * from test with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 33: QUERY: select * from test with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 33: using PQexec +[NO_PID]: ecpg_execute line 33: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 33: Correctly got 6 tuples with 2 fields +[NO_PID]: ecpg_execute line 33: Correctly got 6 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute putting result (6 tuples) into descriptor 'mydesc' +[NO_PID]: ecpg_execute putting result (6 tuples) into descriptor 'mydesc' [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc_header: found 2 attributes. [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGstore_result: line 35: allocating memory for 6 tuples +[NO_PID]: ecpg_store_result: line 35: allocating memory for 6 tuples [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 35: RESULT: 1 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 35: RESULT: 1 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 35: RESULT: 2 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 35: RESULT: 2 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 35: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 35: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 35: RESULT: 4 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 35: RESULT: 4 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 35: RESULT: 5 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 35: RESULT: 5 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 35: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 35: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 2 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGstore_result: line 36: allocating memory for 6 tuples +[NO_PID]: ecpg_store_result: line 36: allocating memory for 6 tuples [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 36: RESULT: one offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 36: RESULT: one offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 36: RESULT: two offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 36: RESULT: two offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 36: RESULT: three offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 36: RESULT: three offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 36: RESULT: four offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 36: RESULT: four offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 36: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 36: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 36: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 36: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 52 action = rollback connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-dyntest.stderr b/src/interfaces/ecpg/test/expected/sql-dyntest.stderr index bfeab8a9c7..a8cf6eed9b 100644 --- a/src/interfaces/ecpg/test/expected/sql-dyntest.stderr +++ b/src/interfaces/ecpg/test/expected/sql-dyntest.stderr @@ -2,45 +2,45 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 49: QUERY: set datestyle to german with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 49: QUERY: set datestyle to german with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 49: using PQexec +[NO_PID]: ecpg_execute line 49: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 49 Ok: SET +[NO_PID]: ecpg_execute line 49 Ok: SET [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 51: QUERY: create table dyntest ( name char ( 14 ) , d float8 , i int , bignumber int8 , b boolean , comment text , day date ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 51: QUERY: create table dyntest ( name char ( 14 ) , d float8 , i int , bignumber int8 , b boolean , comment text , day date ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 51: using PQexec +[NO_PID]: ecpg_execute line 51: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 51 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 51 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 54: QUERY: insert into dyntest values ( 'first entry' , 14.7 , 14 , 123045607890 , true , 'The world''s most advanced open source database.' , '1987-07-14' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 54: QUERY: insert into dyntest values ( 'first entry' , 14.7 , 14 , 123045607890 , true , 'The world''s most advanced open source database.' , '1987-07-14' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 54: using PQexec +[NO_PID]: ecpg_execute line 54: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 54 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 54 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 55: QUERY: insert into dyntest values ( 'second entry' , 1407.87 , 1407 , 987065403210 , false , 'The elephant never forgets.' , '1999-11-5' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 55: QUERY: insert into dyntest values ( 'second entry' , 1407.87 , 1407 , 987065403210 , false , 'The elephant never forgets.' , '1999-11-5' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 55: using PQexec +[NO_PID]: ecpg_execute line 55: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 55 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 55 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGprepare line 57: NAME: myquery QUERY: select * from dyntest [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 60: QUERY: declare MYCURS cursor for select * from dyntest with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 60: QUERY: declare MYCURS cursor for select * from dyntest with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 60: using PQexec +[NO_PID]: ecpg_execute line 60: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 60 Ok: DECLARE CURSOR +[NO_PID]: ecpg_execute line 60 Ok: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 64: QUERY: fetch in MYCURS with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 64: QUERY: fetch in MYCURS with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 64: using PQexec +[NO_PID]: ecpg_execute line 64: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 64: Correctly got 1 tuples with 7 fields +[NO_PID]: ecpg_execute line 64: Correctly got 1 tuples with 7 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute putting result (1 tuples) into descriptor 'MYDESC' +[NO_PID]: ecpg_execute putting result (1 tuples) into descriptor 'MYDESC' [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc_header: found 7 attributes. [NO_PID]: sqlca: code: 0, state: 00000 @@ -64,7 +64,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 186: RESULT: first entry offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 186: RESULT: first entry offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 2 [NO_PID]: sqlca: code: 0, state: 00000 @@ -86,7 +86,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 2 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 175: RESULT: 14.7 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 175: RESULT: 14.7 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 3 [NO_PID]: sqlca: code: 0, state: 00000 @@ -108,7 +108,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 3 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 171: RESULT: 14 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 171: RESULT: 14 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 4 [NO_PID]: sqlca: code: 0, state: 00000 @@ -130,7 +130,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 4 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 190: RESULT: 123045607890 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 190: RESULT: 123045607890 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 5 [NO_PID]: sqlca: code: 0, state: 00000 @@ -152,7 +152,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 5 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 166: RESULT: t offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 166: RESULT: t offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 6 [NO_PID]: sqlca: code: 0, state: 00000 @@ -174,7 +174,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 6 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 186: RESULT: The world's most advanced open source database. offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 186: RESULT: The world's most advanced open source database. offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 7 [NO_PID]: sqlca: code: 0, state: 00000 @@ -202,15 +202,15 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: TYPE = 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 179: RESULT: 14.07.1987 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 179: RESULT: 14.07.1987 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 64: QUERY: fetch in MYCURS with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 64: QUERY: fetch in MYCURS with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 64: using PQexec +[NO_PID]: ecpg_execute line 64: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 64: Correctly got 1 tuples with 7 fields +[NO_PID]: ecpg_execute line 64: Correctly got 1 tuples with 7 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute putting result (1 tuples) into descriptor 'MYDESC' +[NO_PID]: ecpg_execute putting result (1 tuples) into descriptor 'MYDESC' [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc_header: found 7 attributes. [NO_PID]: sqlca: code: 0, state: 00000 @@ -234,7 +234,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 186: RESULT: second entry offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 186: RESULT: second entry offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 2 [NO_PID]: sqlca: code: 0, state: 00000 @@ -256,7 +256,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 2 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 175: RESULT: 1407.87 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 175: RESULT: 1407.87 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 3 [NO_PID]: sqlca: code: 0, state: 00000 @@ -278,7 +278,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 3 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 171: RESULT: 1407 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 171: RESULT: 1407 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 4 [NO_PID]: sqlca: code: 0, state: 00000 @@ -300,7 +300,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 4 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 190: RESULT: 987065403210 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 190: RESULT: 987065403210 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 5 [NO_PID]: sqlca: code: 0, state: 00000 @@ -322,7 +322,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 5 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 166: RESULT: f offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 166: RESULT: f offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 6 [NO_PID]: sqlca: code: 0, state: 00000 @@ -344,7 +344,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 6 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 186: RESULT: The elephant never forgets. offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 186: RESULT: The elephant never forgets. offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: reading items for tuple 7 [NO_PID]: sqlca: code: 0, state: 00000 @@ -372,19 +372,19 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGget_desc: TYPE = 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 179: RESULT: 05.11.1999 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 179: RESULT: 05.11.1999 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 64: QUERY: fetch in MYCURS with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 64: QUERY: fetch in MYCURS with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 64: using PQexec +[NO_PID]: ecpg_execute line 64: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 64: Correctly got 0 tuples with 7 fields +[NO_PID]: ecpg_execute line 64: Correctly got 0 tuples with 7 fields [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: raising sqlcode 100 in line 64, 'No data found in line 64.'. [NO_PID]: sqlca: code: 100, state: 02000 -[NO_PID]: ECPGexecute line 197: QUERY: close MYCURS with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 197: QUERY: close MYCURS with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 197: using PQexec +[NO_PID]: ecpg_execute line 197: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 197 Ok: CLOSE CURSOR +[NO_PID]: ecpg_execute line 197 Ok: CLOSE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-execute.stderr b/src/interfaces/ecpg/test/expected/sql-execute.stderr index d9fbbc3497..d0e7c6a0c9 100644 --- a/src/interfaces/ecpg/test/expected/sql-execute.stderr +++ b/src/interfaces/ecpg/test/expected/sql-execute.stderr @@ -2,147 +2,147 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 25: QUERY: create table test ( name char ( 8 ) , amount int , letter char ( 1 ) ) with 0 parameter on connection main +[NO_PID]: ecpg_execute line 25: QUERY: create table test ( name char ( 8 ) , amount int , letter char ( 1 ) ) with 0 parameter on connection main [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 25: using PQexec +[NO_PID]: ecpg_execute line 25: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 25 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 25 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 26 action = commit connection = main [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 29: QUERY: insert into test (name, amount, letter) values ('db: ''r1''', 1, 'f') with 0 parameter on connection main +[NO_PID]: ecpg_execute line 29: QUERY: insert into test (name, amount, letter) values ('db: ''r1''', 1, 'f') with 0 parameter on connection main [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 29: using PQexec +[NO_PID]: ecpg_execute line 29: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 29 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 29 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 32: QUERY: insert into test (name, amount, letter) values ('db: ''r1''', 2, 't') with 0 parameter on connection main +[NO_PID]: ecpg_execute line 32: QUERY: insert into test (name, amount, letter) values ('db: ''r1''', 2, 't') with 0 parameter on connection main [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 32: using PQexec +[NO_PID]: ecpg_execute line 32: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 32 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 32 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: QUERY: insert into test (name, amount, letter) select name, amount+10, letter from test with 0 parameter on connection main +[NO_PID]: ecpg_execute line 35: QUERY: insert into test (name, amount, letter) select name, amount+10, letter from test with 0 parameter on connection main [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: using PQexec +[NO_PID]: ecpg_execute line 35: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35 Ok: INSERT 0 2 +[NO_PID]: ecpg_execute line 35 Ok: INSERT 0 2 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGprepare line 40: NAME: i QUERY: insert into test (name, amount, letter) select name, amount+$1, letter from test [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 41: QUERY: insert into test (name, amount, letter) select name, amount+$1, letter from test with 1 parameter on connection main +[NO_PID]: ecpg_execute line 41: QUERY: insert into test (name, amount, letter) select name, amount+$1, letter from test with 1 parameter on connection main [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 41: using PQexecPrepared for insert into test (name, amount, letter) select name, amount+$1, letter from test +[NO_PID]: ecpg_execute line 41: using PQexecPrepared for insert into test (name, amount, letter) select name, amount+$1, letter from test [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 41: parameter 1 = 100 +[NO_PID]: free_params line 41: parameter 1 = 100 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 41 Ok: INSERT 0 4 +[NO_PID]: ecpg_execute line 41 Ok: INSERT 0 4 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 45 action = commit connection = main [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGprepare line 49: NAME: f QUERY: select * from test [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: QUERY: declare CUR cursor for select * from test with 0 parameter on connection main +[NO_PID]: ecpg_execute line 52: QUERY: declare CUR cursor for select * from test with 0 parameter on connection main [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: using PQexec +[NO_PID]: ecpg_execute line 52: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52 Ok: DECLARE CURSOR +[NO_PID]: ecpg_execute line 52 Ok: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 53: QUERY: fetch 8 in CUR with 0 parameter on connection main +[NO_PID]: ecpg_execute line 53: QUERY: fetch 8 in CUR with 0 parameter on connection main [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 53: using PQexec +[NO_PID]: ecpg_execute line 53: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 53: Correctly got 8 tuples with 3 fields +[NO_PID]: ecpg_execute line 53: Correctly got 8 tuples with 3 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: db: 'r1' offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: db: 'r1' offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: db: 'r1' offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: db: 'r1' offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: db: 'r1' offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: db: 'r1' offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: db: 'r1' offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: db: 'r1' offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: db: 'r1' offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: db: 'r1' offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: db: 'r1' offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: db: 'r1' offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: db: 'r1' offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: db: 'r1' offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: db: 'r1' offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: db: 'r1' offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: 1 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: 1 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: 2 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: 2 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: 11 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: 11 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: 12 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: 12 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: 101 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: 101 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: 102 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: 102 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: 111 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: 111 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: 112 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: 112 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: f offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: f offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: t offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: t offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: f offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: f offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: t offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: t offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: f offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: f offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: t offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: t offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: f offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: f offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: t offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: t offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 66: QUERY: close CUR with 0 parameter on connection main +[NO_PID]: ecpg_execute line 66: QUERY: close CUR with 0 parameter on connection main [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 66: using PQexec +[NO_PID]: ecpg_execute line 66: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 66 Ok: CLOSE CURSOR +[NO_PID]: ecpg_execute line 66 Ok: CLOSE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGdeallocate line 67: NAME: f [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGprepare line 71: NAME: f QUERY: select * from test where amount = $1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 74: QUERY: declare CUR2 cursor for select * from test where amount = $1 with 1 parameter on connection main +[NO_PID]: ecpg_execute line 74: QUERY: declare CUR2 cursor for select * from test where amount = $1 with 1 parameter on connection main [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 74: using PQexecParams +[NO_PID]: ecpg_execute line 74: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 74: parameter 1 = 1 +[NO_PID]: free_params line 74: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 74 Ok: DECLARE CURSOR +[NO_PID]: ecpg_execute line 74 Ok: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 75: QUERY: fetch in CUR2 with 0 parameter on connection main +[NO_PID]: ecpg_execute line 75: QUERY: fetch in CUR2 with 0 parameter on connection main [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 75: using PQexec +[NO_PID]: ecpg_execute line 75: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 75: Correctly got 1 tuples with 3 fields +[NO_PID]: ecpg_execute line 75: Correctly got 1 tuples with 3 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 75: RESULT: db: 'r1' offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 75: RESULT: db: 'r1' offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 75: RESULT: 1 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 75: RESULT: 1 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 75: RESULT: f offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 75: RESULT: f offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 88: QUERY: close CUR2 with 0 parameter on connection main +[NO_PID]: ecpg_execute line 88: QUERY: close CUR2 with 0 parameter on connection main [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 88: using PQexec +[NO_PID]: ecpg_execute line 88: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 88 Ok: CLOSE CURSOR +[NO_PID]: ecpg_execute line 88 Ok: CLOSE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 89: QUERY: drop table test with 0 parameter on connection main +[NO_PID]: ecpg_execute line 89: QUERY: drop table test with 0 parameter on connection main [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 89: using PQexec +[NO_PID]: ecpg_execute line 89: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 89 Ok: DROP TABLE +[NO_PID]: ecpg_execute line 89 Ok: DROP TABLE [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 90 action = commit connection = main [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-fetch.stderr b/src/interfaces/ecpg/test/expected/sql-fetch.stderr index acdd7bd906..44d00c2e55 100644 --- a/src/interfaces/ecpg/test/expected/sql-fetch.stderr +++ b/src/interfaces/ecpg/test/expected/sql-fetch.stderr @@ -2,117 +2,117 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 19: QUERY: create table My_Table ( Item1 int , Item2 text ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 19: QUERY: create table My_Table ( Item1 int , Item2 text ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 19: using PQexec +[NO_PID]: ecpg_execute line 19: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 19 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 19 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 21: QUERY: insert into My_Table values ( 1 , 'text1' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 21: QUERY: insert into My_Table values ( 1 , 'text1' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 21: using PQexec +[NO_PID]: ecpg_execute line 21: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 21 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 21 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 22: QUERY: insert into My_Table values ( 2 , 'text2' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 22: QUERY: insert into My_Table values ( 2 , 'text2' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 22: using PQexec +[NO_PID]: ecpg_execute line 22: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 22 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 22 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 23: QUERY: insert into My_Table values ( 3 , 'text3' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 23: QUERY: insert into My_Table values ( 3 , 'text3' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 23: using PQexec +[NO_PID]: ecpg_execute line 23: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 23 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 23 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 24: QUERY: insert into My_Table values ( 4 , 'text4' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 24: QUERY: insert into My_Table values ( 4 , 'text4' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 24: using PQexec +[NO_PID]: ecpg_execute line 24: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 24 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 24 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 28: QUERY: declare C cursor for select * from My_Table with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 28: QUERY: declare C cursor for select * from My_Table with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 28: using PQexec +[NO_PID]: ecpg_execute line 28: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 28 Ok: DECLARE CURSOR +[NO_PID]: ecpg_execute line 28 Ok: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 32: QUERY: fetch 1 in C with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 32: QUERY: fetch 1 in C with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 32: using PQexec +[NO_PID]: ecpg_execute line 32: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 32: Correctly got 1 tuples with 2 fields +[NO_PID]: ecpg_execute line 32: Correctly got 1 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 32: RESULT: 1 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 32: RESULT: 1 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 32: RESULT: text1 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 32: RESULT: text1 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 32: QUERY: fetch 1 in C with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 32: QUERY: fetch 1 in C with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 32: using PQexec +[NO_PID]: ecpg_execute line 32: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 32: Correctly got 1 tuples with 2 fields +[NO_PID]: ecpg_execute line 32: Correctly got 1 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 32: RESULT: 2 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 32: RESULT: 2 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 32: RESULT: text2 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 32: RESULT: text2 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 32: QUERY: fetch 1 in C with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 32: QUERY: fetch 1 in C with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 32: using PQexec +[NO_PID]: ecpg_execute line 32: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 32: Correctly got 1 tuples with 2 fields +[NO_PID]: ecpg_execute line 32: Correctly got 1 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 32: RESULT: 3 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 32: RESULT: 3 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 32: RESULT: text3 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 32: RESULT: text3 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 32: QUERY: fetch 1 in C with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 32: QUERY: fetch 1 in C with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 32: using PQexec +[NO_PID]: ecpg_execute line 32: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 32: Correctly got 1 tuples with 2 fields +[NO_PID]: ecpg_execute line 32: Correctly got 1 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 32: RESULT: 4 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 32: RESULT: 4 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 32: RESULT: text4 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 32: RESULT: text4 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 32: QUERY: fetch 1 in C with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 32: QUERY: fetch 1 in C with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 32: using PQexec +[NO_PID]: ecpg_execute line 32: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 32: Correctly got 0 tuples with 2 fields +[NO_PID]: ecpg_execute line 32: Correctly got 0 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: raising sqlcode 100 in line 32, 'No data found in line 32.'. [NO_PID]: sqlca: code: 100, state: 02000 -[NO_PID]: ECPGexecute line 37: QUERY: move backward 2 in C with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 37: QUERY: move backward 2 in C with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 37: using PQexec +[NO_PID]: ecpg_execute line 37: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 37 Ok: MOVE 2 +[NO_PID]: ecpg_execute line 37 Ok: MOVE 2 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 39: QUERY: fetch 1 in C with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 39: QUERY: fetch 1 in C with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 39: using PQexec +[NO_PID]: ecpg_execute line 39: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 39: Correctly got 1 tuples with 2 fields +[NO_PID]: ecpg_execute line 39: Correctly got 1 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 39: RESULT: 4 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 39: RESULT: 4 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 39: RESULT: text4 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 39: RESULT: text4 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 42: QUERY: close C with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 42: QUERY: close C with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 42: using PQexec +[NO_PID]: ecpg_execute line 42: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 42 Ok: CLOSE CURSOR +[NO_PID]: ecpg_execute line 42 Ok: CLOSE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 44: QUERY: drop table My_Table with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 44: QUERY: drop table My_Table with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 44: using PQexec +[NO_PID]: ecpg_execute line 44: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 44 Ok: DROP TABLE +[NO_PID]: ecpg_execute line 44 Ok: DROP TABLE [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection regress1 closed. [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-func.stderr b/src/interfaces/ecpg/test/expected/sql-func.stderr index cafe0cf689..e43355559b 100644 --- a/src/interfaces/ecpg/test/expected/sql-func.stderr +++ b/src/interfaces/ecpg/test/expected/sql-func.stderr @@ -4,73 +4,73 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGsetcommit line 13 action = on connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 17: QUERY: create table My_Table ( Item1 int , Item2 text ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 17: QUERY: create table My_Table ( Item1 int , Item2 text ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 17: using PQexec +[NO_PID]: ecpg_execute line 17: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 17 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 17 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 18: QUERY: create table Log ( name text , w text ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 18: QUERY: create table Log ( name text , w text ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 18: using PQexec +[NO_PID]: ecpg_execute line 18: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 18 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 18 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 20: QUERY: create function My_Table_Check () returns trigger as $test$ BEGIN INSERT INTO Log VALUES(TG_NAME, TG_WHEN); RETURN NEW; END; $test$ language plpgsql with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 20: QUERY: create function My_Table_Check () returns trigger as $test$ BEGIN INSERT INTO Log VALUES(TG_NAME, TG_WHEN); RETURN NEW; END; $test$ language plpgsql with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 20: using PQexec +[NO_PID]: ecpg_execute line 20: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 20 Ok: CREATE FUNCTION +[NO_PID]: ecpg_execute line 20 Ok: CREATE FUNCTION [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 28: QUERY: create trigger My_Table_Check_Trigger before insert on My_Table for each row execute procedure My_Table_Check ( ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 28: QUERY: create trigger My_Table_Check_Trigger before insert on My_Table for each row execute procedure My_Table_Check ( ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 28: using PQexec +[NO_PID]: ecpg_execute line 28: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 28 Ok: CREATE TRIGGER +[NO_PID]: ecpg_execute line 28 Ok: CREATE TRIGGER [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 34: QUERY: insert into My_Table values ( 1234 , 'Some random text' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 34: QUERY: insert into My_Table values ( 1234 , 'Some random text' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 34: using PQexec +[NO_PID]: ecpg_execute line 34: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 34 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 34 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: QUERY: insert into My_Table values ( 5678 , 'The Quick Brown' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 35: QUERY: insert into My_Table values ( 5678 , 'The Quick Brown' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: using PQexec +[NO_PID]: ecpg_execute line 35: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 35 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 36: QUERY: select name from Log limit 1 with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 36: QUERY: select name from Log limit 1 with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 36: using PQexec +[NO_PID]: ecpg_execute line 36: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 36: Correctly got 1 tuples with 1 fields +[NO_PID]: ecpg_execute line 36: Correctly got 1 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 36: RESULT: my_table_check_trigger offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 36: RESULT: my_table_check_trigger offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 39: QUERY: drop trigger My_Table_Check_Trigger on My_Table with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 39: QUERY: drop trigger My_Table_Check_Trigger on My_Table with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 39: using PQexec +[NO_PID]: ecpg_execute line 39: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 39 Ok: DROP TRIGGER +[NO_PID]: ecpg_execute line 39 Ok: DROP TRIGGER [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 40: QUERY: drop function My_Table_Check () with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 40: QUERY: drop function My_Table_Check () with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 40: using PQexec +[NO_PID]: ecpg_execute line 40: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 40 Ok: DROP FUNCTION +[NO_PID]: ecpg_execute line 40 Ok: DROP FUNCTION [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 41: QUERY: drop table Log with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 41: QUERY: drop table Log with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 41: using PQexec +[NO_PID]: ecpg_execute line 41: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 41 Ok: DROP TABLE +[NO_PID]: ecpg_execute line 41 Ok: DROP TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 42: QUERY: drop table My_Table with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 42: QUERY: drop table My_Table with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 42: using PQexec +[NO_PID]: ecpg_execute line 42: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 42 Ok: DROP TABLE +[NO_PID]: ecpg_execute line 42 Ok: DROP TABLE [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection regress1 closed. [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-indicators.stderr b/src/interfaces/ecpg/test/expected/sql-indicators.stderr index 5a24225ecb..98c8ce4f06 100644 --- a/src/interfaces/ecpg/test/expected/sql-indicators.stderr +++ b/src/interfaces/ecpg/test/expected/sql-indicators.stderr @@ -4,83 +4,83 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGsetcommit line 17 action = off connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 19: QUERY: create table indicator_test ( "id" int primary key , "str" text not null , val int null ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 19: QUERY: create table indicator_test ( "id" int primary key , "str" text not null , val int null ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 19: using PQexec +[NO_PID]: ecpg_execute line 19: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 19 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 19 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 23 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 25: QUERY: insert into indicator_test ( id , str , val ) values ( 1 , 'Hello' , 0 ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 25: QUERY: insert into indicator_test ( id , str , val ) values ( 1 , 'Hello' , 0 ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 25: using PQexec +[NO_PID]: ecpg_execute line 25: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 25 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 25 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 28: QUERY: insert into indicator_test ( id , str , val ) values ( 2 , 'Hi there' , $1 ) with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 28: QUERY: insert into indicator_test ( id , str , val ) values ( 2 , 'Hi there' , $1 ) with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 28: using PQexecParams +[NO_PID]: ecpg_execute line 28: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 28: parameter 1 = null +[NO_PID]: free_params line 28: parameter 1 = null [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 28 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 28 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 30: QUERY: insert into indicator_test ( id , str , val ) values ( 3 , 'Good evening' , $1 ) with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 30: QUERY: insert into indicator_test ( id , str , val ) values ( 3 , 'Good evening' , $1 ) with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 30: using PQexecParams +[NO_PID]: ecpg_execute line 30: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 30: parameter 1 = 5 +[NO_PID]: free_params line 30: parameter 1 = 5 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 30 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 30 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 31 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 34: QUERY: select val from indicator_test where id = 1 with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 34: QUERY: select val from indicator_test where id = 1 with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 34: using PQexec +[NO_PID]: ecpg_execute line 34: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 34: Correctly got 1 tuples with 1 fields +[NO_PID]: ecpg_execute line 34: Correctly got 1 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 34: RESULT: 0 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 34: RESULT: 0 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: QUERY: select val from indicator_test where id = 2 with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 35: QUERY: select val from indicator_test where id = 2 with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: using PQexec +[NO_PID]: ecpg_execute line 35: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: Correctly got 1 tuples with 1 fields +[NO_PID]: ecpg_execute line 35: Correctly got 1 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 35: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 35: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 37: QUERY: select val from indicator_test where id = 3 with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 37: QUERY: select val from indicator_test where id = 3 with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 37: using PQexec +[NO_PID]: ecpg_execute line 37: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 37: Correctly got 1 tuples with 1 fields +[NO_PID]: ecpg_execute line 37: Correctly got 1 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 37: RESULT: 5 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 37: RESULT: 5 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 42: QUERY: update indicator_test set val = $1 where id = 1 with 1 parameter on connection regress1 +[NO_PID]: ecpg_execute line 42: QUERY: update indicator_test set val = $1 where id = 1 with 1 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 42: using PQexecParams +[NO_PID]: ecpg_execute line 42: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 42: parameter 1 = null +[NO_PID]: free_params line 42: parameter 1 = null [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 42 Ok: UPDATE 1 +[NO_PID]: ecpg_execute line 42 Ok: UPDATE 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 43: QUERY: select val from indicator_test where id = 1 with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 43: QUERY: select val from indicator_test where id = 1 with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 43: using PQexec +[NO_PID]: ecpg_execute line 43: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 43: Correctly got 1 tuples with 1 fields +[NO_PID]: ecpg_execute line 43: Correctly got 1 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 43: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 43: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 46: QUERY: drop table indicator_test with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 46: QUERY: drop table indicator_test with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 46: using PQexec +[NO_PID]: ecpg_execute line 46: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 46 Ok: DROP TABLE +[NO_PID]: ecpg_execute line 46 Ok: DROP TABLE [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 47 action = commit connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-insupd.stderr b/src/interfaces/ecpg/test/expected/sql-insupd.stderr index a14a627d9e..969c0c377e 100644 --- a/src/interfaces/ecpg/test/expected/sql-insupd.stderr +++ b/src/interfaces/ecpg/test/expected/sql-insupd.stderr @@ -2,65 +2,65 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 18: QUERY: create table insupd_test ( a int , b int ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 18: QUERY: create table insupd_test ( a int , b int ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 18: using PQexec +[NO_PID]: ecpg_execute line 18: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 18 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 18 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 20: QUERY: insert into insupd_test ( a , b ) values ( 1 , 1 ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 20: QUERY: insert into insupd_test ( a , b ) values ( 1 , 1 ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 20: using PQexec +[NO_PID]: ecpg_execute line 20: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 20 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 20 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 21: QUERY: insert into insupd_test ( a , b ) values ( 2 , 2 ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 21: QUERY: insert into insupd_test ( a , b ) values ( 2 , 2 ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 21: using PQexec +[NO_PID]: ecpg_execute line 21: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 21 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 21 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 22: QUERY: insert into insupd_test ( a , b ) values ( 3 , 3 ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 22: QUERY: insert into insupd_test ( a , b ) values ( 3 , 3 ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 22: using PQexec +[NO_PID]: ecpg_execute line 22: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 22 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 22 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 24: QUERY: update insupd_test set a = a + 1 with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 24: QUERY: update insupd_test set a = a + 1 with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 24: using PQexec +[NO_PID]: ecpg_execute line 24: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 24 Ok: UPDATE 3 +[NO_PID]: ecpg_execute line 24 Ok: UPDATE 3 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 25: QUERY: update insupd_test set ( a , b )= ( 5 , 5 ) where a = 4 with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 25: QUERY: update insupd_test set ( a , b )= ( 5 , 5 ) where a = 4 with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 25: using PQexec +[NO_PID]: ecpg_execute line 25: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 25 Ok: UPDATE 1 +[NO_PID]: ecpg_execute line 25 Ok: UPDATE 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: QUERY: update insupd_test set a = 4 where a = 3 with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 26: QUERY: update insupd_test set a = 4 where a = 3 with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: using PQexec +[NO_PID]: ecpg_execute line 26: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26 Ok: UPDATE 1 +[NO_PID]: ecpg_execute line 26 Ok: UPDATE 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 28: QUERY: select a , b from insupd_test order by a with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 28: QUERY: select a , b from insupd_test order by a with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 28: using PQexec +[NO_PID]: ecpg_execute line 28: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 28: Correctly got 3 tuples with 2 fields +[NO_PID]: ecpg_execute line 28: Correctly got 3 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 28: RESULT: 2 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 28: RESULT: 2 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 28: RESULT: 4 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 28: RESULT: 4 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 28: RESULT: 5 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 28: RESULT: 5 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 28: RESULT: 1 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 28: RESULT: 1 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 28: RESULT: 2 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 28: RESULT: 2 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 28: RESULT: 5 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 28: RESULT: 5 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection regress1 closed. [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-oldexec.stderr b/src/interfaces/ecpg/test/expected/sql-oldexec.stderr index c1f85b0b63..ef365db2c9 100644 --- a/src/interfaces/ecpg/test/expected/sql-oldexec.stderr +++ b/src/interfaces/ecpg/test/expected/sql-oldexec.stderr @@ -2,147 +2,147 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 25: QUERY: create table test ( name char ( 8 ) , amount int , letter char ( 1 ) ) with 0 parameter on connection main +[NO_PID]: ecpg_execute line 25: QUERY: create table test ( name char ( 8 ) , amount int , letter char ( 1 ) ) with 0 parameter on connection main [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 25: using PQexec +[NO_PID]: ecpg_execute line 25: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 25 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 25 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 26 action = commit connection = main [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 29: QUERY: insert into test (name, amount, letter) values ('db: ''r1''', 1, 'f') with 0 parameter on connection main +[NO_PID]: ecpg_execute line 29: QUERY: insert into test (name, amount, letter) values ('db: ''r1''', 1, 'f') with 0 parameter on connection main [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 29: using PQexec +[NO_PID]: ecpg_execute line 29: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 29 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 29 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 32: QUERY: insert into test (name, amount, letter) values ('db: ''r1''', 2, 't') with 0 parameter on connection main +[NO_PID]: ecpg_execute line 32: QUERY: insert into test (name, amount, letter) values ('db: ''r1''', 2, 't') with 0 parameter on connection main [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 32: using PQexec +[NO_PID]: ecpg_execute line 32: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 32 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 32 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: QUERY: insert into test (name, amount, letter) select name, amount+10, letter from test with 0 parameter on connection main +[NO_PID]: ecpg_execute line 35: QUERY: insert into test (name, amount, letter) select name, amount+10, letter from test with 0 parameter on connection main [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: using PQexec +[NO_PID]: ecpg_execute line 35: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35 Ok: INSERT 0 2 +[NO_PID]: ecpg_execute line 35 Ok: INSERT 0 2 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGprepare line 40: NAME: i QUERY: insert into test (name, amount, letter) select name, amount+$1, letter from test [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 41: QUERY: insert into test (name, amount, letter) select name, amount+$1, letter from test with 1 parameter on connection main +[NO_PID]: ecpg_execute line 41: QUERY: insert into test (name, amount, letter) select name, amount+$1, letter from test with 1 parameter on connection main [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 41: using PQexecPrepared for insert into test (name, amount, letter) select name, amount+$1, letter from test +[NO_PID]: ecpg_execute line 41: using PQexecPrepared for insert into test (name, amount, letter) select name, amount+$1, letter from test [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 41: parameter 1 = 100 +[NO_PID]: free_params line 41: parameter 1 = 100 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 41 Ok: INSERT 0 4 +[NO_PID]: ecpg_execute line 41 Ok: INSERT 0 4 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 45 action = commit connection = main [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGprepare line 49: NAME: f QUERY: select * from test [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: QUERY: declare CUR cursor for select * from test with 0 parameter on connection main +[NO_PID]: ecpg_execute line 52: QUERY: declare CUR cursor for select * from test with 0 parameter on connection main [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52: using PQexec +[NO_PID]: ecpg_execute line 52: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 52 Ok: DECLARE CURSOR +[NO_PID]: ecpg_execute line 52 Ok: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 53: QUERY: fetch 8 in CUR with 0 parameter on connection main +[NO_PID]: ecpg_execute line 53: QUERY: fetch 8 in CUR with 0 parameter on connection main [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 53: using PQexec +[NO_PID]: ecpg_execute line 53: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 53: Correctly got 8 tuples with 3 fields +[NO_PID]: ecpg_execute line 53: Correctly got 8 tuples with 3 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: db: 'r1' offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: db: 'r1' offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: db: 'r1' offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: db: 'r1' offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: db: 'r1' offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: db: 'r1' offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: db: 'r1' offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: db: 'r1' offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: db: 'r1' offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: db: 'r1' offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: db: 'r1' offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: db: 'r1' offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: db: 'r1' offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: db: 'r1' offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: db: 'r1' offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: db: 'r1' offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: 1 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: 1 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: 2 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: 2 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: 11 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: 11 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: 12 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: 12 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: 101 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: 101 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: 102 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: 102 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: 111 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: 111 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: 112 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: 112 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: f offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: f offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: t offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: t offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: f offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: f offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: t offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: t offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: f offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: f offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: t offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: t offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: f offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: f offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 53: RESULT: t offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 53: RESULT: t offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 66: QUERY: close CUR with 0 parameter on connection main +[NO_PID]: ecpg_execute line 66: QUERY: close CUR with 0 parameter on connection main [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 66: using PQexec +[NO_PID]: ecpg_execute line 66: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 66 Ok: CLOSE CURSOR +[NO_PID]: ecpg_execute line 66 Ok: CLOSE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGdeallocate line 70: NAME: f [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGprepare line 70: NAME: f QUERY: select * from test where $1 = amount [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 73: QUERY: declare CUR3 cursor for select * from test where $1 = amount with 1 parameter on connection main +[NO_PID]: ecpg_execute line 73: QUERY: declare CUR3 cursor for select * from test where $1 = amount with 1 parameter on connection main [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 73: using PQexecParams +[NO_PID]: ecpg_execute line 73: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 73: parameter 1 = 1 +[NO_PID]: free_params line 73: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 73 Ok: DECLARE CURSOR +[NO_PID]: ecpg_execute line 73 Ok: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 74: QUERY: fetch in CUR3 with 0 parameter on connection main +[NO_PID]: ecpg_execute line 74: QUERY: fetch in CUR3 with 0 parameter on connection main [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 74: using PQexec +[NO_PID]: ecpg_execute line 74: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 74: Correctly got 1 tuples with 3 fields +[NO_PID]: ecpg_execute line 74: Correctly got 1 tuples with 3 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 74: RESULT: db: 'r1' offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 74: RESULT: db: 'r1' offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 74: RESULT: 1 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 74: RESULT: 1 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 74: RESULT: f offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 74: RESULT: f offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 87: QUERY: close CUR3 with 0 parameter on connection main +[NO_PID]: ecpg_execute line 87: QUERY: close CUR3 with 0 parameter on connection main [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 87: using PQexec +[NO_PID]: ecpg_execute line 87: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 87 Ok: CLOSE CURSOR +[NO_PID]: ecpg_execute line 87 Ok: CLOSE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 88: QUERY: drop table test with 0 parameter on connection main +[NO_PID]: ecpg_execute line 88: QUERY: drop table test with 0 parameter on connection main [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 88: using PQexec +[NO_PID]: ecpg_execute line 88: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 88 Ok: DROP TABLE +[NO_PID]: ecpg_execute line 88 Ok: DROP TABLE [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 89 action = commit connection = main [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-parser.stderr b/src/interfaces/ecpg/test/expected/sql-parser.stderr index 0e59ddda8b..8c53e705d1 100644 --- a/src/interfaces/ecpg/test/expected/sql-parser.stderr +++ b/src/interfaces/ecpg/test/expected/sql-parser.stderr @@ -4,47 +4,47 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGsetcommit line 16 action = on connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 20: QUERY: create table T ( Item1 int , Item2 int ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 20: QUERY: create table T ( Item1 int , Item2 int ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 20: using PQexec +[NO_PID]: ecpg_execute line 20: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 20 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 20 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 22: QUERY: insert into T values ( 1 , null ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 22: QUERY: insert into T values ( 1 , null ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 22: using PQexec +[NO_PID]: ecpg_execute line 22: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 22 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 22 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 23: QUERY: insert into T values ( 1 , 1 ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 23: QUERY: insert into T values ( 1 , 1 ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 23: using PQexec +[NO_PID]: ecpg_execute line 23: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 23 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 23 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 24: QUERY: insert into T values ( 1 , 2 ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 24: QUERY: insert into T values ( 1 , 2 ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 24: using PQexec +[NO_PID]: ecpg_execute line 24: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 24 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 24 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: QUERY: select Item2 from T order by Item2 nulls last with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 26: QUERY: select Item2 from T order by Item2 nulls last with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: using PQexec +[NO_PID]: ecpg_execute line 26: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: Correctly got 3 tuples with 1 fields +[NO_PID]: ecpg_execute line 26: Correctly got 3 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 26: RESULT: 1 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 26: RESULT: 1 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 26: RESULT: 2 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 26: RESULT: 2 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 26: RESULT: offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 26: RESULT: offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 31: QUERY: drop table T with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 31: QUERY: drop table T with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 31: using PQexec +[NO_PID]: ecpg_execute line 31: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 31 Ok: DROP TABLE +[NO_PID]: ecpg_execute line 31 Ok: DROP TABLE [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection regress1 closed. [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-quote.stderr b/src/interfaces/ecpg/test/expected/sql-quote.stderr index 631223b6f7..c46c656c6c 100644 --- a/src/interfaces/ecpg/test/expected/sql-quote.stderr +++ b/src/interfaces/ecpg/test/expected/sql-quote.stderr @@ -4,118 +4,118 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGsetcommit line 16 action = on connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 20: QUERY: create table "My_Table" ( Item1 int , Item2 text ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 20: QUERY: create table "My_Table" ( Item1 int , Item2 text ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 20: using PQexec +[NO_PID]: ecpg_execute line 20: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 20 Ok: CREATE TABLE +[NO_PID]: ecpg_execute line 20 Ok: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 22: QUERY: show standard_conforming_strings with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 22: QUERY: show standard_conforming_strings with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 22: using PQexec +[NO_PID]: ecpg_execute line 22: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 22: Correctly got 1 tuples with 1 fields +[NO_PID]: ecpg_execute line 22: Correctly got 1 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 22: RESULT: off offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 22: RESULT: off offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: QUERY: insert into "My_Table" values ( 1 , 'a\\\\b' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 26: QUERY: insert into "My_Table" values ( 1 , 'a\\\\b' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGnoticeReceiver nonstandard use of \\ in a string literal [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: raising sqlcode 0 [NO_PID]: sqlca: code: 0, state: 22P06 -[NO_PID]: ECPGexecute line 26: using PQexec +[NO_PID]: ecpg_execute line 26: using PQexec [NO_PID]: sqlca: code: 0, state: 22P06 -[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 26 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 22P06 sql error nonstandard use of \\ in a string literal -[NO_PID]: ECPGexecute line 28: QUERY: insert into "My_Table" values ( 1 , E'a\\\\b' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 28: QUERY: insert into "My_Table" values ( 1 , E'a\\\\b' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 28: using PQexec +[NO_PID]: ecpg_execute line 28: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 28 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 28 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 30: QUERY: set standard_conforming_strings to on with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 30: QUERY: set standard_conforming_strings to on with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 30: using PQexec +[NO_PID]: ecpg_execute line 30: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 30 Ok: SET +[NO_PID]: ecpg_execute line 30 Ok: SET [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 33: QUERY: insert into "My_Table" values ( 2 , 'a\\\\b' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 33: QUERY: insert into "My_Table" values ( 2 , 'a\\\\b' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 33: using PQexec +[NO_PID]: ecpg_execute line 33: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 33 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 33 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: QUERY: insert into "My_Table" values ( 2 , E'a\\\\b' ) with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 35: QUERY: insert into "My_Table" values ( 2 , E'a\\\\b' ) with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35: using PQexec +[NO_PID]: ecpg_execute line 35: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 35 Ok: INSERT 0 1 +[NO_PID]: ecpg_execute line 35 Ok: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGtrans line 37 action = begin transaction connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 40: QUERY: declare C cursor for select * from "My_Table" with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 40: QUERY: declare C cursor for select * from "My_Table" with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 40: using PQexec +[NO_PID]: ecpg_execute line 40: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 40 Ok: DECLARE CURSOR +[NO_PID]: ecpg_execute line 40 Ok: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 46: QUERY: fetch C with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 46: QUERY: fetch C with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 46: using PQexec +[NO_PID]: ecpg_execute line 46: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 46: Correctly got 1 tuples with 2 fields +[NO_PID]: ecpg_execute line 46: Correctly got 1 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 46: RESULT: 1 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 46: RESULT: 1 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 46: RESULT: a\\b offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 46: RESULT: a\\b offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 46: QUERY: fetch C with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 46: QUERY: fetch C with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 46: using PQexec +[NO_PID]: ecpg_execute line 46: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 46: Correctly got 1 tuples with 2 fields +[NO_PID]: ecpg_execute line 46: Correctly got 1 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 46: RESULT: 1 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 46: RESULT: 1 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 46: RESULT: a\\b offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 46: RESULT: a\\b offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 46: QUERY: fetch C with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 46: QUERY: fetch C with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 46: using PQexec +[NO_PID]: ecpg_execute line 46: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 46: Correctly got 1 tuples with 2 fields +[NO_PID]: ecpg_execute line 46: Correctly got 1 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 46: RESULT: 2 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 46: RESULT: 2 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 46: RESULT: a\\\\b offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 46: RESULT: a\\\\b offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 46: QUERY: fetch C with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 46: QUERY: fetch C with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 46: using PQexec +[NO_PID]: ecpg_execute line 46: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 46: Correctly got 1 tuples with 2 fields +[NO_PID]: ecpg_execute line 46: Correctly got 1 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 46: RESULT: 2 offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 46: RESULT: 2 offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 46: RESULT: a\\b offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 46: RESULT: a\\b offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 46: QUERY: fetch C with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 46: QUERY: fetch C with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 46: using PQexec +[NO_PID]: ecpg_execute line 46: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 46: Correctly got 0 tuples with 2 fields +[NO_PID]: ecpg_execute line 46: Correctly got 0 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: raising sqlcode 100 in line 46, 'No data found in line 46.'. [NO_PID]: sqlca: code: 100, state: 02000 [NO_PID]: ECPGtrans line 50 action = rollback connection = regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 51: QUERY: drop table "My_Table" with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 51: QUERY: drop table "My_Table" with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 51: using PQexec +[NO_PID]: ecpg_execute line 51: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 51 Ok: DROP TABLE +[NO_PID]: ecpg_execute line 51 Ok: DROP TABLE [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection regress1 closed. [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-show.stderr b/src/interfaces/ecpg/test/expected/sql-show.stderr index 173f497d69..0014fff0e1 100644 --- a/src/interfaces/ecpg/test/expected/sql-show.stderr +++ b/src/interfaces/ecpg/test/expected/sql-show.stderr @@ -2,61 +2,61 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 18: QUERY: set search_path to 'public' with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 18: QUERY: set search_path to 'public' with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 18: using PQexec +[NO_PID]: ecpg_execute line 18: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 18 Ok: SET +[NO_PID]: ecpg_execute line 18 Ok: SET [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 19: QUERY: show search_path with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 19: QUERY: show search_path with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 19: using PQexec +[NO_PID]: ecpg_execute line 19: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 19: Correctly got 1 tuples with 1 fields +[NO_PID]: ecpg_execute line 19: Correctly got 1 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 19: RESULT: public offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 19: RESULT: public offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 22: QUERY: set standard_conforming_strings to off with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 22: QUERY: set standard_conforming_strings to off with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 22: using PQexec +[NO_PID]: ecpg_execute line 22: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 22 Ok: SET +[NO_PID]: ecpg_execute line 22 Ok: SET [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 23: QUERY: show standard_conforming_strings with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 23: QUERY: show standard_conforming_strings with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 23: using PQexec +[NO_PID]: ecpg_execute line 23: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 23: Correctly got 1 tuples with 1 fields +[NO_PID]: ecpg_execute line 23: Correctly got 1 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 23: RESULT: off offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 23: RESULT: off offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: QUERY: set time zone PST8PDT with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 26: QUERY: set time zone PST8PDT with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26: using PQexec +[NO_PID]: ecpg_execute line 26: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 26 Ok: SET +[NO_PID]: ecpg_execute line 26 Ok: SET [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 27: QUERY: show time zone with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 27: QUERY: show time zone with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 27: using PQexec +[NO_PID]: ecpg_execute line 27: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 27: Correctly got 1 tuples with 1 fields +[NO_PID]: ecpg_execute line 27: Correctly got 1 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 27: RESULT: PST8PDT offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 27: RESULT: PST8PDT offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 30: QUERY: set transaction isolation level read committed with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 30: QUERY: set transaction isolation level read committed with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 30: using PQexec +[NO_PID]: ecpg_execute line 30: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 30 Ok: SET +[NO_PID]: ecpg_execute line 30 Ok: SET [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 31: QUERY: show transaction isolation level with 0 parameter on connection regress1 +[NO_PID]: ecpg_execute line 31: QUERY: show transaction isolation level with 0 parameter on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 31: using PQexec +[NO_PID]: ecpg_execute line 31: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGexecute line 31: Correctly got 1 tuples with 1 fields +[NO_PID]: ecpg_execute line 31: Correctly got 1 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGget_data line 31: RESULT: read committed offset: -1 array: Yes +[NO_PID]: ecpg_get_data line 31: RESULT: read committed offset: -1 array: Yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection regress1 closed. [NO_PID]: sqlca: code: 0, state: 00000