Commit d3e131e0 authored by Michael Meskes's avatar Michael Meskes

- Changed some whitespacing in connect statement.

- Made some chars const as proposed by Stefan Huehner <stefan@huehner.org>.
- Synced parser and keyword lists.
- Copied two token parsing from backend parser to ecpg parser.
- Also added a test case for this.
parent e6e78187
......@@ -2096,48 +2096,48 @@ Mo Aug 14 10:39:59 CEST 2006
- Fixed a nasty buffer underrun that only occured when using Informix
no_indicator NULL setting on timestamps and intervals.
Fr 18. Aug 17:32:54 CEST 2006
Fr Aug 18 17:32:54 CEST 2006
- Changed lexer to no longer use the default rule.
- Synced parser and keyword list.
- Fixed parsing of CONNECT statement so it accepts a C string again.
- Fixed a buffer overrun that was masked on Linux systems.
Sa 19. Aug 14:11:32 CEST 2006
Sa Aug 19 14:11:32 CEST 2006
- More SoC stuff.
Tu 22. Aug 13:54:08 CEST 2006
Tu Aug 22 13:54:08 CEST 2006
- Descriptor values were quoted twice.
We 23. Aug 09:32:14 CEST 2006
We Aug 23 09:32:14 CEST 2006
- Replaced double-quote-fix with a hopefully better version.
- Use initializer string length as size for character strings.
- Added ecpg_config.h file that is created via configure.
Th 24. Aug 11:53:29 CEST 2006
Th Aug 24 11:53:29 CEST 2006
- Fixed of by one variable size.
- Synced parser.
Su 27. Aug 17:54:36 CEST 2006
Su Aug 27 17:54:36 CEST 2006
- Enabled single-quoted connection targets.
- Fixed a memory leak/segfault in unsuccessful connection.
Tu 29. Aug 14:21:31 CEST 2006
Tu Aug 29 14:21:31 CEST 2006
- Fixed parser and library to allow empty database names.
- Streamlined connection name parsing.
Su 3. Sep 14:21:29 CEST 2006
Su Sep 3 14:21:29 CEST 2006
- Synced parser.
- Added another regression test and fixed tcp test.
Tu 5. Sep 11:49:08 CEST 2006
Tu Sep 5 11:49:08 CEST 2006
- Synced parser.
- Fixed ecpglib trying to read one character after end-of-string.
......@@ -2145,29 +2145,36 @@ Tu 5. Sep 11:49:08 CEST 2006
- Added some interval checks to regression suite.
- Started to cleanup complex tests.
Th 14. Sep 09:47:03 CEST 2006
Th Sep 14 09:47:03 CEST 2006
- Completely removed complex tests.
- Added missing constuctor/destructor for interval and date.
We 8. Nov 10:53:42 CET 2006
We Nov 8 10:53:42 CET 2006
- Applied patch by Peter Harris to free auto_mem struct in ECPGconnect.
- Set ecpg library version to 5.2.
- Set ecpg version to 4.2.1.
Th 25. Jan 17:17:01 CET 2007
Th Jan 25 17:17:01 CET 2007
- Removed compiler warning due to unneeded unsigned declaration.
- Removed regression test that triggers those libc precision bugs on some archs.
Fr 2. Feb 09:53:48 CET 2007
Fr Feb 2 09:53:48 CET 2007
- Cleaned up va_list handling. Hopefully this now works on all archs.
- Applied Magnus Hagander's patch to take away some compiler warnings.
Su 11. Feb 16:09:31 CET 2007
Su Feb 11 16:09:31 CET 2007
- Fixed multibyte handling as reported by <harada.toshi@oss.ntt.co.jp>.
- Set ecpg library version to 5.3.
Th Mar 15 08:27:53 CET 2007
- Made some chars const as proposed by Stefan Huehner <stefan@huehner.org>.
- Synced parser and keyword lists.
- Copied two token parsing from backend parser to ecpg parser.
- Also added a test case for this.
- Set ecpg version to 4.3.1.
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.39 2007/01/12 10:00:12 meskes Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.40 2007/03/17 19:25:22 meskes Exp $ */
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
......@@ -473,7 +473,7 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p
if (PQstatus(this->connection) == CONNECTION_BAD)
{
const char *errmsg = PQerrorMessage(this->connection);
char *db = realname ? realname : "<DEFAULT>";
const char *db = realname ? realname : "<DEFAULT>";
ECPGlog("connect: could not open database %s on %s port %s %s%s%s%s in line %d\n\t%s\n",
db,
......
......@@ -542,7 +542,7 @@ dttofmtasc_replace(timestamp * ts, date dDate, int dow, struct tm * tm,
*/
case 'g':
{
char *fmt = "%g"; /* Keep compiler quiet about
const char *fmt = "%g"; /* Keep compiler quiet about
* 2-digit year */
tm->tm_mon -= 1;
......@@ -744,7 +744,7 @@ dttofmtasc_replace(timestamp * ts, date dDate, int dow, struct tm * tm,
*/
case 'x':
{
char *fmt = "%x"; /* Keep compiler quiet about
const char *fmt = "%x"; /* Keep compiler quiet about
* 2-digit year */
tm->tm_mon -= 1;
......
......@@ -4,7 +4,7 @@
#
# Copyright (c) 1998-2007, PostgreSQL Global Development Group
#
# $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.123 2007/01/05 22:20:00 momjian Exp $
# $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.124 2007/03/17 19:25:23 meskes Exp $
#
#-------------------------------------------------------------------------
......@@ -27,7 +27,7 @@ override CFLAGS += -Wno-error
endif
override CFLAGS += $(PTHREAD_CFLAGS)
OBJS= preproc.o type.o ecpg.o ecpg_keywords.o output.o \
OBJS= preproc.o type.o ecpg.o ecpg_keywords.o output.o parser.o \
keywords.o c_keywords.o ../ecpglib/typename.o descriptor.o variable.o \
$(WIN32RES)
......@@ -59,6 +59,8 @@ endif
c_keywords.o ecpg_keywords.o keywords.o preproc.o: preproc.h
parser.c: $(top_srcdir)/src/backend/parser/parser.c
rm -f $@ && $(LN_S) $< .
distprep: $(srcdir)/preproc.c $(srcdir)/preproc.h $(srcdir)/pgc.c
......
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.97 2007/02/01 19:10:29 momjian Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.98 2007/03/17 19:25:23 meskes Exp $ */
/* New main for ecpg, the PostgreSQL embedded SQL precompiler. */
/* (C) Michael Meskes <meskes@postgresql.org> Feb 5th, 1998 */
......@@ -442,7 +442,7 @@ main(int argc, char *const argv[])
output_line_number();
/* and parse the source */
yyparse();
base_yyparse();
/* check if all cursors were indeed opened */
for (ptr = cur; ptr != NULL;)
......
......@@ -4,7 +4,7 @@
* lexical token lookup for reserved words in postgres embedded SQL
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg_keywords.c,v 1.32 2005/12/02 15:03:57 meskes Exp $
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg_keywords.c,v 1.33 2007/03/17 19:25:23 meskes Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -50,7 +50,6 @@ static ScanKeyword ScanKeywords[] = {
{"key_member", SQL_KEY_MEMBER},
{"length", SQL_LENGTH},
{"long", SQL_LONG},
{"name", SQL_NAME},
{"nullable", SQL_NULLABLE},
{"octet_length", SQL_OCTET_LENGTH},
{"open", SQL_OPEN},
......@@ -70,7 +69,6 @@ static ScanKeyword ScanKeywords[] = {
{"stop", SQL_STOP},
{"struct", SQL_STRUCT},
{"unsigned", SQL_UNSIGNED},
{"value", SQL_VALUE},
{"var", SQL_VAR},
{"whenever", SQL_WHENEVER},
};
......
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/extern.h,v 1.64 2007/01/11 15:47:33 meskes Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/extern.h,v 1.65 2007/03/17 19:25:23 meskes Exp $ */
#ifndef _ECPG_PREPROC_EXTERN_H
#define _ECPG_PREPROC_EXTERN_H
......@@ -60,9 +60,9 @@ extern void output_line_number(void);
extern void output_statement(char *, int, char *);
extern void output_simple_statement(char *);
extern char *hashline_number(void);
extern int yyparse(void);
extern int yylex(void);
extern void yyerror(char *);
extern int base_yyparse(void);
extern int base_yylex(void);
extern void base_yyerror(const char *);
extern void *mm_alloc(size_t), *mm_realloc(void *, size_t);
extern char *mm_strdup(const char *);
extern void mmerror(int, enum errortype, char *,...);
......@@ -90,6 +90,10 @@ extern void remove_typedefs(int);
extern void remove_variables(int);
extern struct variable *new_variable(const char *, struct ECPGtype *, int);
extern ScanKeyword *ScanKeywordLookup(char *text);
extern void scanner_init(const char *);
extern void parser_init(void);
extern void scanner_finish(void);
int filtered_base_yylex(void);
/* return codes */
......
......@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.77 2007/01/05 22:20:00 momjian Exp $
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.78 2007/03/17 19:25:23 meskes Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -64,6 +64,7 @@ static ScanKeyword ScanKeywords[] = {
{"cache", CACHE},
{"called", CALLED},
{"cascade", CASCADE},
{"cascaded", CASCADED},
{"case", CASE},
{"cast", CAST},
{"chain", CHAIN},
......@@ -82,12 +83,15 @@ static ScanKeyword ScanKeywords[] = {
{"commit", COMMIT},
{"committed", COMMITTED},
{"concurrently", CONCURRENTLY},
{"concurrently", CONCURRENTLY},
{"connection", CONNECTION},
{"constraint", CONSTRAINT},
{"constraints", CONSTRAINTS},
{"content", CONTENT_P},
{"conversion", CONVERSION_P},
{"convert", CONVERT},
{"copy", COPY},
{"cost", COST},
{"create", CREATE},
{"createdb", CREATEDB},
{"createrole", CREATEROLE},
......@@ -118,6 +122,7 @@ static ScanKeyword ScanKeywords[] = {
{"disable", DISABLE_P},
{"distinct", DISTINCT},
{"do", DO},
{"document", DOCUMENT_P},
{"domain", DOMAIN_P},
{"double", DOUBLE_P},
{"drop", DROP},
......@@ -137,6 +142,7 @@ static ScanKeyword ScanKeywords[] = {
{"external", EXTERNAL},
{"extract", EXTRACT},
{"false", FALSE_P},
{"family", FAMILY},
{"fetch", FETCH},
{"first", FIRST_P},
{"float", FLOAT_P},
......@@ -212,6 +218,7 @@ static ScanKeyword ScanKeywords[] = {
{"mode", MODE},
{"month", MONTH_P},
{"move", MOVE},
{"name", NAME_P},
{"names", NAMES},
{"national", NATIONAL},
{"natural", NATURAL},
......@@ -233,6 +240,7 @@ static ScanKeyword ScanKeywords[] = {
{"nowait", NOWAIT},
{"null", NULL_P},
{"nullif", NULLIF},
{"nulls", NULLS_P},
{"numeric", NUMERIC},
{"object", OBJECT_P},
{"of", OF},
......@@ -306,6 +314,7 @@ static ScanKeyword ScanKeywords[] = {
{"smallint", SMALLINT},
{"some", SOME},
{"stable", STABLE},
{"standalone", STANDALONE_P},
{"start", START},
{"statement", STATEMENT},
{"statistics", STATISTICS},
......@@ -313,6 +322,7 @@ static ScanKeyword ScanKeywords[] = {
{"stdout", STDOUT},
{"storage", STORAGE},
{"strict", STRICT_P},
{"strip", STRIP_P},
{"substring", SUBSTRING},
{"superuser", SUPERUSER_P},
{"symmetric", SYMMETRIC},
......@@ -349,19 +359,32 @@ static ScanKeyword ScanKeywords[] = {
{"vacuum", VACUUM},
{"valid", VALID},
{"validator", VALIDATOR},
{"value", VALUE_P},
{"values", VALUES},
{"varchar", VARCHAR},
{"varying", VARYING},
{"verbose", VERBOSE},
{"version", VERSION_P},
{"view", VIEW},
{"volatile", VOLATILE},
{"when", WHEN},
{"where", WHERE},
{"whitespace", WHITESPACE_P},
{"with", WITH},
{"without", WITHOUT},
{"work", WORK},
{"write", WRITE},
{"xml", XML_P},
{"xmlattributes", XMLATTRIBUTES},
{"xmlconcat", XMLCONCAT},
{"xmlelement", XMLELEMENT},
{"xmlforest", XMLFOREST},
{"xmlparse", XMLPARSE},
{"xmlpi", XMLPI},
{"xmlroot", XMLROOT},
{"xmlserialize", XMLSERIALIZE},
{"year", YEAR_P},
{"yes", YES_P},
{"zone", ZONE},
};
......
The parse.h file has to be in this directory to comply with the backend's source tree.
#include "extern.h"
#include "preproc.h"
......@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.151 2007/01/05 22:20:00 momjian Exp $
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.152 2007/03/17 19:25:23 meskes Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -31,6 +31,8 @@ static char *dolqstart; /* current $foo$ quote start string */
static bool escape_string_warning;
static bool standard_conforming_strings;
static bool warn_on_first_escape;
static YY_BUFFER_STATE scanbufhandle;
static char *scanbuf;
/*
* literalbuf is used to accumulate literal values when multiple rules
......@@ -504,7 +506,7 @@ cppline {space}*#(.*\\{space})*.*{newline}
/* single quote or dollar sign */
addlitchar(yytext[0]);
}
<xdolq><<EOF>> { yyerror("unterminated dollar-quoted string"); }
<xdolq><<EOF>> { base_yyerror("unterminated dollar-quoted string"); }
<SQL>{xdstart} {
state_before = YYSTATE;
BEGIN(xd);
......@@ -1347,3 +1349,45 @@ ecpg_isspace(char ch)
return true;
return false;
}
/*
* Called before any actual parsing is done
*/
void
scanner_init(const char *str)
{
Size slen = strlen(str);
/*
* Might be left over after ereport()
*/
if (YY_CURRENT_BUFFER)
yy_delete_buffer(YY_CURRENT_BUFFER);
/*
* Make a scan buffer with special termination needed by flex.
*/
scanbuf = mm_alloc(slen + 2);
memcpy(scanbuf, str, slen);
scanbuf[slen] = scanbuf[slen + 1] = YY_END_OF_BUFFER_CHAR;
scanbufhandle = yy_scan_buffer(scanbuf, slen + 2);
/* initialize literal buffer to a reasonable but expansible size */
literalalloc = 128;
literalbuf = (char *) mm_alloc(literalalloc);
startlit();
BEGIN(INITIAL);
}
/*
* Called after parsing is done to clean up after scanner_init()
*/
void
scanner_finish(void)
{
yy_delete_buffer(scanbufhandle);
free(scanbuf);
}
This diff is collapsed.
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/type.c,v 1.71 2006/08/13 10:18:30 meskes Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/type.c,v 1.72 2007/03/17 19:25:23 meskes Exp $ */
#include "postgres_fe.h"
......@@ -254,7 +254,7 @@ ECPGdump_a_type(FILE *o, const char *name, struct ECPGtype * type,
break;
default:
if (!IS_SIMPLE_TYPE(type->u.element->type))
yyerror("Internal error: unknown datatype, please inform pgsql-bugs@postgresql.org");
base_yyerror("Internal error: unknown datatype, please inform pgsql-bugs@postgresql.org");
ECPGdump_a_simple(o, name,
type->u.element->type,
......@@ -279,7 +279,7 @@ ECPGdump_a_type(FILE *o, const char *name, struct ECPGtype * type,
ECPGdump_a_struct(o, name, ind_name, make_str("1"), type, ind_type, NULL, prefix, ind_prefix);
break;
case ECPGt_union: /* cannot dump a complete union */
yyerror("Type of union has to be specified");
base_yyerror("Type of union has to be specified");
break;
case ECPGt_char_variable:
if (indicator_set && (ind_type->type == ECPGt_struct || ind_type->type == ECPGt_array))
......@@ -521,7 +521,7 @@ ECPGfree_type(struct ECPGtype * type)
switch (type->u.element->type)
{
case ECPGt_array:
yyerror("internal error, found multidimensional array\n");
base_yyerror("internal error, found multidimensional array\n");
break;
case ECPGt_struct:
case ECPGt_union:
......@@ -531,7 +531,7 @@ ECPGfree_type(struct ECPGtype * type)
break;
default:
if (!IS_SIMPLE_TYPE(type->u.element->type))
yyerror("Internal error: unknown datatype, please inform pgsql-bugs@postgresql.org");
base_yyerror("Internal error: unknown datatype, please inform pgsql-bugs@postgresql.org");
free(type->u.element);
}
......
......@@ -99,14 +99,14 @@ int main(void)
#line 27 "rnull.pgc"
{ ECPGconnect(__LINE__, 1, "regress1" , NULL,NULL , NULL, 0);
{ ECPGconnect(__LINE__, 1, "regress1" , NULL, NULL , NULL, 0);
#line 29 "rnull.pgc"
if (sqlca.sqlcode < 0) sqlprint ( );}
#line 29 "rnull.pgc"
{ ECPGdo(__LINE__, 1, 0, NULL, "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 ) ", ECPGt_EOIT, ECPGt_EORT);
{ ECPGdo(__LINE__, 1, 0, NULL, "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 ) ", ECPGt_EOIT, ECPGt_EORT);
#line 33 "rnull.pgc"
if (sqlca.sqlcode < 0) sqlprint ( );}
......
......@@ -2,19 +2,19 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: 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 ) on connection regress1
[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 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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 , 'abc ' , 17 , -74874 , 't' , 3.710000038147 , 487444 , 404.404 ) on connection regress1
[NO_PID]: ECPGexecute line 36: QUERY: insert into test ( id , c , s , i , b , f , l , dbl ) values ( 1 , 'abc ' , 17 , -74874 , 't' , 3.710000038147 , 487444 , 404.404 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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 , null , null , null , 't' , null , null , null , null , null , null ) on connection regress1
[NO_PID]: ECPGexecute line 52: QUERY: insert into test ( id , c , s , i , b , f , l , dbl , dec , dat , tmp ) values ( 2 , null , null , null , 't' , null , null , null , null , null , null ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 52 Ok: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
......
......@@ -50,7 +50,7 @@ int main(void)
#line 18 "test_informix.pgc"
{ ECPGconnect(__LINE__, 1, "regress1" , NULL,NULL , NULL, 0);
{ ECPGconnect(__LINE__, 1, "regress1" , NULL, NULL , NULL, 0);
#line 20 "test_informix.pgc"
if (sqlca.sqlcode < 0) dosqlprint ( );}
......@@ -127,7 +127,7 @@ if (sqlca.sqlcode < 0) dosqlprint ( );}
/* this however should be ok */
{ ECPGdo(__LINE__, 1, 1, NULL, "select i from test where j = ( select j from test order by i limit 1 ) ", ECPGt_EOIT, ECPGt_EORT);
{ ECPGdo(__LINE__, 1, 1, NULL, "select i from test where j = ( select j from test order by i limit 1 ) ", ECPGt_EOIT, ECPGt_EORT);
#line 43 "test_informix.pgc"
if (sqlca.sqlcode < 0) dosqlprint ( );}
......
......@@ -6,13 +6,13 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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 , 0 ) on connection regress1
[NO_PID]: ECPGexecute line 27: QUERY: insert into test ( i , j ) values ( 7 , 0 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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 ) on connection regress1
[NO_PID]: ECPGexecute line 31: QUERY: insert into test ( i , j ) values ( 7 , 12 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 31: Error: ERROR: duplicate key violates unique constraint "test_pkey"
[NO_PID]: sqlca: code: 0, state: 00000
......@@ -20,7 +20,7 @@
[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( 14 , 1 ) on connection regress1
[NO_PID]: ECPGexecute line 35: QUERY: insert into test ( i , j ) values ( 14 , 1 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 35 Ok: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
......@@ -34,7 +34,7 @@
[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 ) on connection regress1
[NO_PID]: ECPGexecute line 43: QUERY: select i from test where j = ( select j from test order by i limit 1 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 43: Correctly got 1 tuples with 1 fields
[NO_PID]: sqlca: code: 0, state: 00000
......@@ -64,7 +64,7 @@
[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 = 21.0 on connection regress1
[NO_PID]: ECPGexecute line 72: QUERY: delete from test where i = 21.0 on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 72 Ok: DELETE 0
[NO_PID]: sqlca: code: 0, state: 00000
......
......@@ -172,7 +172,7 @@ int main(void)
ECPGdebug(1, stderr);
strcpy(dbname, "regress1");
{ ECPGconnect(__LINE__, 1, dbname , NULL,NULL , NULL, 0);
{ ECPGconnect(__LINE__, 1, dbname , NULL, NULL , NULL, 0);
#line 63 "test_informix2.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
......
......@@ -10,7 +10,7 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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' ) on connection regress1
[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' ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 71 Ok: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
......@@ -28,7 +28,7 @@
[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]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 95: QUERY: insert into history ( customerid , timestamp , action_taken , narrative ) values( 2 , timestamp '2003-05-08 15:53:39' , 'test' , 'test' ) on connection regress1
[NO_PID]: ECPGexecute line 95: QUERY: insert into history ( customerid , timestamp , action_taken , narrative ) values ( 2 , timestamp '2003-05-08 15:53:39' , 'test' , 'test' ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 95 Ok: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
......
......@@ -48,10 +48,10 @@ main(void)
ECPGdebug(1, stderr);
strcpy(id, "first");
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL,NULL , id, 0); }
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , id, 0); }
#line 24 "test2.pgc"
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , "second", 0); }
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , "second", 0); }
#line 25 "test2.pgc"
......
......@@ -47,10 +47,10 @@ main(void)
ECPGdebug(1, stderr);
strcpy(id, "first");
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL,NULL , id, 0); }
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , id, 0); }
#line 23 "test3.pgc"
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , "second", 0); }
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , "second", 0); }
#line 24 "test3.pgc"
......@@ -71,7 +71,7 @@ main(void)
#line 31 "test3.pgc"
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , "second", 0); }
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , "second", 0); }
#line 33 "test3.pgc"
/* will close "second" */
......@@ -79,7 +79,7 @@ main(void)
#line 35 "test3.pgc"
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL,NULL , "second", 0); }
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , "second", 0); }
#line 37 "test3.pgc"
{ ECPGdisconnect(__LINE__, "ALL");}
......
......@@ -29,7 +29,7 @@ main(void)
{
ECPGdebug(1, stderr);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , "main", 0); }
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , "main", 0); }
#line 13 "test4.pgc"
......
......@@ -37,7 +37,7 @@ main(void)
ECPGdebug(1, stderr);
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL,NULL , "main", 0); }
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , "main", 0); }
#line 22 "test5.pgc"
{ ECPGdo(__LINE__, 0, 1, NULL, "alter user connectuser encrypted password 'connectpw'", ECPGt_EOIT, ECPGt_EORT);}
......@@ -49,28 +49,28 @@ main(void)
strcpy(db, "connectdb");
strcpy(id, "main");
{ ECPGconnect(__LINE__, 0, db , NULL,NULL , id, 0); }
{ ECPGconnect(__LINE__, 0, db , NULL, NULL , id, 0); }
#line 28 "test5.pgc"
{ ECPGdisconnect(__LINE__, id);}
#line 29 "test5.pgc"
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL,NULL , "main", 0); }
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , "main", 0); }
#line 31 "test5.pgc"
{ ECPGdisconnect(__LINE__, "main");}
#line 32 "test5.pgc"
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL,NULL , "main", 0); }
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , "main", 0); }
#line 34 "test5.pgc"
{ ECPGdisconnect(__LINE__, "main");}
#line 35 "test5.pgc"
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL,NULL , "main", 0); }
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , "main", 0); }
#line 37 "test5.pgc"
{ ECPGdisconnect(__LINE__, "main");}
......@@ -127,10 +127,10 @@ main(void)
/* connect twice */
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL,NULL , "main", 0); }
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , "main", 0); }
#line 62 "test5.pgc"
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL,NULL , "main", 0); }
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , "main", 0); }
#line 63 "test5.pgc"
{ ECPGdisconnect(__LINE__, "main");}
......
......@@ -60,13 +60,13 @@ main(void)
/* exec sql whenever sqlerror do sqlprint ( ) ; */
#line 27 "dt_test.pgc"
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0);
#line 28 "dt_test.pgc"
if (sqlca.sqlcode < 0) sqlprint ( );}
#line 28 "dt_test.pgc"
{ ECPGdo(__LINE__, 0, 1, NULL, "create table date_test ( d date , ts timestamp ) ", ECPGt_EOIT, ECPGt_EORT);
{ ECPGdo(__LINE__, 0, 1, NULL, "create table date_test ( d date , ts timestamp ) ", ECPGt_EOIT, ECPGt_EORT);
#line 29 "dt_test.pgc"
if (sqlca.sqlcode < 0) sqlprint ( );}
......
......@@ -2,7 +2,7 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 29: QUERY: create table date_test ( d date , ts timestamp ) on connection regress1
[NO_PID]: ECPGexecute line 29: QUERY: create table date_test ( d date , ts timestamp ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 29 Ok: CREATE TABLE
[NO_PID]: sqlca: code: 0, state: 00000
......@@ -10,7 +10,7 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 30 Ok: SET
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 35: QUERY: insert into date_test ( d , ts ) values( date '1966-01-17' , timestamp '2000-07-12 17:34:29' ) on connection regress1
[NO_PID]: ECPGexecute line 35: QUERY: insert into date_test ( d , ts ) values ( date '1966-01-17' , timestamp '2000-07-12 17:34:29' ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 35 Ok: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
......
......@@ -55,7 +55,7 @@ main(void)
#line 30 "num_test.pgc"
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0);
#line 32 "num_test.pgc"
if (sqlca.sqlcode < 0) sqlprint ( );}
......
......@@ -32,7 +32,7 @@ int main(void)
{
ECPGdebug(1, stderr);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
#line 17 "comment.pgc"
......
......@@ -71,7 +71,7 @@ main(void)
ECPGdebug(1, stderr);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0);
#line 34 "define.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
......
......@@ -111,7 +111,7 @@ main (void)
ECPGdebug (1, stderr);
empl.idnum = 1;
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
#line 43 "type.pgc"
if (sqlca.sqlcode)
......
......@@ -120,7 +120,7 @@ main (void)
ECPGdebug(1, stderr);
strcpy(msg, "connect");
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0);
#line 43 "variable.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
......@@ -136,7 +136,7 @@ if (sqlca.sqlcode < 0) sqlprint();}
strcpy(msg, "create");
{ ECPGdo(__LINE__, 0, 1, NULL, "create table family ( name char ( 8 ) , born integer , age smallint , married date , children integer ) ", ECPGt_EOIT, ECPGt_EORT);
{ ECPGdo(__LINE__, 0, 1, NULL, "create table family ( name char ( 8 ) , born integer , age smallint , married date , children integer ) ", ECPGt_EOIT, ECPGt_EORT);
#line 49 "variable.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
......
......@@ -6,7 +6,7 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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 ) on connection regress1
[NO_PID]: ECPGexecute line 49: QUERY: create table family ( name char ( 8 ) , born integer , age smallint , married date , children integer ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 49 Ok: CREATE TABLE
[NO_PID]: sqlca: code: 0, state: 00000
......
......@@ -59,7 +59,7 @@ int main(void)
ECPGdebug(1, stderr);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0);
#line 31 "whenever.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
......
......@@ -135,7 +135,7 @@ main (void)
ECPGdebug(1, stderr);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0);
#line 27 "array.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
......
......@@ -66,7 +66,7 @@ main (void)
ECPGdebug (1, stderr);
empl.idnum = 1;
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
#line 28 "binary.pgc"
if (sqlca.sqlcode)
......@@ -75,7 +75,7 @@ main (void)
exit (sqlca.sqlcode);
}
{ ECPGdo(__LINE__, 0, 1, NULL, "create table empl ( idnum integer , name char ( 20 ) , accs smallint , byte bytea ) ", ECPGt_EOIT, ECPGt_EORT);}
{ ECPGdo(__LINE__, 0, 1, NULL, "create table empl ( idnum integer , name char ( 20 ) , accs smallint , byte bytea ) ", ECPGt_EOIT, ECPGt_EORT);}
#line 36 "binary.pgc"
if (sqlca.sqlcode)
......
......@@ -2,7 +2,7 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 35: QUERY: create table empl ( idnum integer , name char ( 20 ) , accs smallint , byte bytea ) on connection regress1
[NO_PID]: ECPGexecute line 35: QUERY: create table empl ( idnum integer , name char ( 20 ) , accs smallint , byte bytea ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 35 Ok: CREATE TABLE
[NO_PID]: sqlca: code: 0, state: 00000
......
......@@ -106,12 +106,12 @@ int main(int argc, char **argv)
ECPGdebug(1,stderr);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
#line 15 "code100.pgc"
if (sqlca.sqlcode) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
{ ECPGdo(__LINE__, 0, 1, NULL, "create table test ( \"index\" numeric ( 3 ) primary key , \"payload\" int4 not null ) ", ECPGt_EOIT, ECPGt_EORT);}
{ ECPGdo(__LINE__, 0, 1, NULL, "create table test ( \"index\" numeric ( 3 ) primary key , \"payload\" int4 not null ) ", ECPGt_EOIT, ECPGt_EORT);}
#line 20 "code100.pgc"
if (sqlca.sqlcode) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
......
......@@ -2,67 +2,67 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 18: QUERY: create table test ( "index" numeric ( 3 ) primary key , "payload" int4 not null ) on connection regress1
[NO_PID]: ECPGexecute line 18: QUERY: create table test ( "index" numeric ( 3 ) primary key , "payload" int4 not null ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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 , 0 ) on connection regress1
[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , 0 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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 ) on connection regress1
[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , 1 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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 , 2 ) on connection regress1
[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , 2 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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 , 3 ) on connection regress1
[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , 3 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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 , 4 ) on connection regress1
[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , 4 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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 , 5 ) on connection regress1
[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , 5 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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 , 6 ) on connection regress1
[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , 6 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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 , 7 ) on connection regress1
[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , 7 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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 , 8 ) on connection regress1
[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , 8 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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 , 9 ) on connection regress1
[NO_PID]: ECPGexecute line 26: QUERY: insert into test ( payload , index ) values ( 0 , 9 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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 on connection regress1
[NO_PID]: ECPGexecute line 34: QUERY: update test set payload = payload + 1 where index = - 1 on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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 on connection regress1
[NO_PID]: ECPGexecute line 38: QUERY: delete from test where index = - 1 on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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 ) on connection regress1
[NO_PID]: ECPGexecute line 41: QUERY: insert into test ( select * from test where index = - 1 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 41 Ok: INSERT 0 0
[NO_PID]: sqlca: code: 0, state: 00000
......
......@@ -107,7 +107,7 @@ main ()
ECPGdebug (1, stderr);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0);
#line 19 "copystdout.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
......
......@@ -6,15 +6,15 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 20 Ok: CREATE TABLE
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 21: QUERY: insert into foo values( 5 , 'abc' ) on connection regress1
[NO_PID]: ECPGexecute line 21: QUERY: insert into foo values ( 5 , 'abc' ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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' ) on connection regress1
[NO_PID]: ECPGexecute line 22: QUERY: insert into foo values ( 6 , 'def' ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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' ) on connection regress1
[NO_PID]: ECPGexecute line 23: QUERY: insert into foo values ( 7 , 'ghi' ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 23 Ok: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
......
......@@ -113,14 +113,14 @@ int main(void)
/* exec sql whenever sqlerror do sqlprint ( ) ; */
#line 16 "define.pgc"
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0);
#line 17 "define.pgc"
if (sqlca.sqlcode < 0) sqlprint ( );}
#line 17 "define.pgc"
{ ECPGdo(__LINE__, 0, 1, NULL, "create table test ( a int , b text ) ", ECPGt_EOIT, ECPGt_EORT);
{ ECPGdo(__LINE__, 0, 1, NULL, "create table test ( a int , b text ) ", ECPGt_EOIT, ECPGt_EORT);
#line 19 "define.pgc"
if (sqlca.sqlcode < 0) sqlprint ( );}
......@@ -157,7 +157,7 @@ if (sqlca.sqlcode < 0) sqlprint ( );}
{ ECPGdo(__LINE__, 0, 1, NULL, "select 1 , 29 :: text || '-' || 'abcdef' ", ECPGt_EOIT,
{ ECPGdo(__LINE__, 0, 1, NULL, "select 1 , 29 :: text || '-' || 'abcdef' ", ECPGt_EOIT,
ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
ECPGt_char,(s),(long)200,(long)1,(200)*sizeof(char),
......
......@@ -2,23 +2,23 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 19: QUERY: create table test ( a int , b text ) on connection regress1
[NO_PID]: ECPGexecute line 19: QUERY: create table test ( a int , b text ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 19 Ok: CREATE TABLE
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 20: QUERY: insert into test values( 29 , 'abcdef' ) on connection regress1
[NO_PID]: ECPGexecute line 20: QUERY: insert into test values ( 29 , 'abcdef' ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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' ) on connection regress1
[NO_PID]: ECPGexecute line 23: QUERY: insert into test values ( null , 'defined' ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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' ) on connection regress1
[NO_PID]: ECPGexecute line 31: QUERY: insert into test values ( null , 'someothervar not defined' ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 31 Ok: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 36: QUERY: select 1 , 29 :: text || '-' || 'abcdef' on connection regress1
[NO_PID]: ECPGexecute line 36: QUERY: select 1 , 29 :: text || '-' || 'abcdef' on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 36: Correctly got 1 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
......@@ -26,7 +26,7 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_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' ) on connection regress1
[NO_PID]: ECPGexecute line 42: QUERY: insert into test values ( 29 , 'no string' ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 42 Ok: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
......
......@@ -96,14 +96,14 @@ if (sqlca.sqlcode < 0) sqlprint();}
#line 25 "desc.pgc"
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0);
#line 27 "desc.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
#line 27 "desc.pgc"
{ ECPGdo(__LINE__, 0, 1, NULL, "create table test1 ( a int , b text ) ", ECPGt_EOIT, ECPGt_EORT);
{ ECPGdo(__LINE__, 0, 1, NULL, "create table test1 ( a int , b text ) ", ECPGt_EOIT, ECPGt_EORT);
#line 29 "desc.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
......
......@@ -2,7 +2,7 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 29: QUERY: create table test1 ( a int , b text ) on connection regress1
[NO_PID]: ECPGexecute line 29: QUERY: create table test1 ( a int , b text ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 29 Ok: CREATE TABLE
[NO_PID]: sqlca: code: 0, state: 00000
......
......@@ -171,7 +171,7 @@ int main(void)
/* exec sql whenever sqlerror do sqlprint ( ) ; */
#line 32 "dynalloc.pgc"
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0);
#line 33 "dynalloc.pgc"
if (sqlca.sqlcode < 0) sqlprint ( );}
......@@ -185,7 +185,7 @@ if (sqlca.sqlcode < 0) sqlprint ( );}
#line 35 "dynalloc.pgc"
{ ECPGdo(__LINE__, 0, 1, NULL, "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 ) ", ECPGt_EOIT, ECPGt_EORT);
{ ECPGdo(__LINE__, 0, 1, NULL, "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 ) ", ECPGt_EOIT, ECPGt_EORT);
#line 37 "dynalloc.pgc"
if (sqlca.sqlcode < 0) sqlprint ( );}
......@@ -210,7 +210,7 @@ if (sqlca.sqlcode < 0) sqlprint ( );}
if (sqlca.sqlcode < 0) sqlprint ( );
#line 41 "dynalloc.pgc"
{ ECPGdo(__LINE__, 0, 1, NULL, "select a , b , c , d , e , f , g , h , i from test order by a", ECPGt_EOIT,
{ ECPGdo(__LINE__, 0, 1, NULL, "select a , b , c , d , e , f , g , h , i from test order by a ", ECPGt_EOIT,
ECPGt_descriptor, "mydesc", 0L, 0L, 0L,
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
#line 42 "dynalloc.pgc"
......
......@@ -6,19 +6,19 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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 ) on connection regress1
[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 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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' ) on connection regress1
[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' ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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 ) on connection regress1
[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 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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 on connection regress1
[NO_PID]: ECPGexecute line 42: QUERY: select a , b , c , d , e , f , g , h , i from test order by a on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 42: Correctly got 2 tuples with 9 fields
[NO_PID]: sqlca: code: 0, state: 00000
......
......@@ -125,7 +125,7 @@ int main(void)
/* exec sql whenever sqlerror do sqlprint ( ) ; */
#line 19 "dynalloc2.pgc"
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0);
#line 20 "dynalloc2.pgc"
if (sqlca.sqlcode < 0) sqlprint ( );}
......@@ -139,7 +139,7 @@ if (sqlca.sqlcode < 0) sqlprint ( );}
#line 22 "dynalloc2.pgc"
{ ECPGdo(__LINE__, 0, 1, NULL, "create table test ( a int , b text ) ", ECPGt_EOIT, ECPGt_EORT);
{ ECPGdo(__LINE__, 0, 1, NULL, "create table test ( a int , b text ) ", ECPGt_EOIT, ECPGt_EORT);
#line 24 "dynalloc2.pgc"
if (sqlca.sqlcode < 0) sqlprint ( );}
......
......@@ -6,31 +6,31 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 22 Ok: SET
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 24: QUERY: create table test ( a int , b text ) on connection regress1
[NO_PID]: ECPGexecute line 24: QUERY: create table test ( a int , b text ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 24 Ok: CREATE TABLE
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 25: QUERY: insert into test values( 1 , 'one' ) on connection regress1
[NO_PID]: ECPGexecute line 25: QUERY: insert into test values ( 1 , 'one' ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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' ) on connection regress1
[NO_PID]: ECPGexecute line 26: QUERY: insert into test values ( 2 , 'two' ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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' ) on connection regress1
[NO_PID]: ECPGexecute line 27: QUERY: insert into test values ( null , 'three' ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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' ) on connection regress1
[NO_PID]: ECPGexecute line 28: QUERY: insert into test values ( 4 , 'four' ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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 ) on connection regress1
[NO_PID]: ECPGexecute line 29: QUERY: insert into test values ( 5 , null ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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 ) on connection regress1
[NO_PID]: ECPGexecute line 30: QUERY: insert into test values ( null , null ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 30 Ok: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
......
......@@ -219,7 +219,7 @@ if (sqlca.sqlcode < 0) error ( );
#line 45 "dyntest.pgc"
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0);
#line 47 "dyntest.pgc"
if (sqlca.sqlcode < 0) error ( );}
......@@ -233,7 +233,7 @@ if (sqlca.sqlcode < 0) error ( );}
#line 49 "dyntest.pgc"
{ ECPGdo(__LINE__, 0, 1, NULL, "create table dyntest ( name char ( 14 ) , d float8 , i int , bignumber int8 , b boolean , comment text , day date ) ", ECPGt_EOIT, ECPGt_EORT);
{ ECPGdo(__LINE__, 0, 1, NULL, "create table dyntest ( name char ( 14 ) , d float8 , i int , bignumber int8 , b boolean , comment text , day date ) ", ECPGt_EOIT, ECPGt_EORT);
#line 53 "dyntest.pgc"
if (sqlca.sqlcode < 0) error ( );}
......
......@@ -6,15 +6,15 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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 ) on connection regress1
[NO_PID]: ECPGexecute line 51: QUERY: create table dyntest ( name char ( 14 ) , d float8 , i int , bignumber int8 , b boolean , comment text , day date ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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' ) on connection regress1
[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' ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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' ) on connection regress1
[NO_PID]: ECPGexecute line 55: QUERY: insert into dyntest values ( 'second entry' , 1407.87 , 1407 , 987065403210 , false , 'The elephant never forgets.' , '1999-11-5' ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 55 Ok: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
......
......@@ -59,7 +59,7 @@ main(void)
ECPGdebug(1, stderr);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , "main", 0);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , "main", 0);
#line 24 "execute.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
......
......@@ -38,7 +38,7 @@ int main(int argc, char* argv[]) {
ECPGdebug(1, stderr);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
#line 14 "fetch.pgc"
......@@ -49,7 +49,7 @@ int main(int argc, char* argv[]) {
#line 17 "fetch.pgc"
{ ECPGdo(__LINE__, 0, 1, NULL, "create table My_Table ( Item1 int , Item2 text ) ", ECPGt_EOIT, ECPGt_EORT);
{ ECPGdo(__LINE__, 0, 1, NULL, "create table My_Table ( Item1 int , Item2 text ) ", ECPGt_EOIT, ECPGt_EORT);
#line 19 "fetch.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
......
......@@ -2,7 +2,7 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 19: QUERY: create table My_Table ( Item1 int , Item2 text ) on connection regress1
[NO_PID]: ECPGexecute line 19: QUERY: create table My_Table ( Item1 int , Item2 text ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 19 Ok: CREATE TABLE
[NO_PID]: sqlca: code: 0, state: 00000
......
......@@ -26,7 +26,7 @@
int main(int argc, char* argv[]) {
ECPGdebug(1, stderr);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
#line 10 "func.pgc"
......@@ -40,7 +40,7 @@ int main(int argc, char* argv[]) {
#line 14 "func.pgc"
{ ECPGdo(__LINE__, 0, 1, NULL, "create table My_Table ( Item1 int , Item2 text ) ", ECPGt_EOIT, ECPGt_EORT);
{ ECPGdo(__LINE__, 0, 1, NULL, "create table My_Table ( Item1 int , Item2 text ) ", ECPGt_EOIT, ECPGt_EORT);
#line 16 "func.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
......@@ -50,7 +50,7 @@ if (sqlca.sqlcode < 0) sqlprint();}
#line 16 "func.pgc"
{ ECPGdo(__LINE__, 0, 1, NULL, "create function My_Table_Check () returns trigger as $test$\
{ ECPGdo(__LINE__, 0, 1, NULL, "create function My_Table_Check () returns trigger as $test$\
BEGIN\
RAISE WARNING 'Notice: TG_NAME=%, TG WHEN=%', TG_NAME, TG_WHEN;\
RETURN NEW;\
......
......@@ -4,11 +4,11 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGsetcommit line 12 action = on connection = regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 16: QUERY: create table My_Table ( Item1 int , Item2 text ) on connection regress1
[NO_PID]: ECPGexecute line 16: QUERY: create table My_Table ( Item1 int , Item2 text ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 16 Ok: CREATE TABLE
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 18: QUERY: create function My_Table_Check () returns trigger as $test$ BEGIN RAISE WARNING 'Notice: TG_NAME=%, TG WHEN=%', TG_NAME, TG_WHEN; RETURN NEW; END; $test$ language plpgsql on connection regress1
[NO_PID]: ECPGexecute line 18: QUERY: create function My_Table_Check () returns trigger as $test$ BEGIN RAISE WARNING 'Notice: TG_NAME=%, TG WHEN=%', TG_NAME, TG_WHEN; RETURN NEW; END; $test$ language plpgsql on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 18 Ok: CREATE FUNCTION
[NO_PID]: sqlca: code: 0, state: 00000
......@@ -16,7 +16,7 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 26 Ok: CREATE TRIGGER
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 32: QUERY: insert into My_Table values( 1234 , 'Some random text' ) on connection regress1
[NO_PID]: ECPGexecute line 32: QUERY: insert into My_Table values ( 1234 , 'Some random text' ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: Notice: TG_NAME=my_table_check_trigger, TG WHEN=BEFORE[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: raising sqlcode 0
......@@ -24,7 +24,7 @@
[NO_PID]: ECPGexecute line 32 Ok: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 01000
sql error Notice: TG_NAME=my_table_check_trigger, TG WHEN=BEFORE
[NO_PID]: ECPGexecute line 33: QUERY: insert into My_Table values( 5678 , 'The Quick Brown' ) on connection regress1
[NO_PID]: ECPGexecute line 33: QUERY: insert into My_Table values ( 5678 , 'The Quick Brown' ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: Notice: TG_NAME=my_table_check_trigger, TG WHEN=BEFORE[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: raising sqlcode 0
......
......@@ -110,14 +110,14 @@ int main(int argc, char **argv)
ECPGdebug(1,stderr);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
#line 16 "indicators.pgc"
{ ECPGsetcommit(__LINE__, "off", NULL);}
#line 17 "indicators.pgc"
{ ECPGdo(__LINE__, 0, 1, NULL, "create table test ( \"id\" int primary key , \"str\" text not null , val int null ) ", ECPGt_EOIT, ECPGt_EORT);}
{ ECPGdo(__LINE__, 0, 1, NULL, "create table test ( \"id\" int primary key , \"str\" text not null , val int null ) ", ECPGt_EOIT, ECPGt_EORT);}
#line 22 "indicators.pgc"
{ ECPGtrans(__LINE__, NULL, "commit");}
......
......@@ -4,21 +4,21 @@
[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 test ( "id" int primary key , "str" text not null , val int null ) on connection regress1
[NO_PID]: ECPGexecute line 19: QUERY: create table test ( "id" int primary key , "str" text not null , val int null ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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 test ( id , str , val ) values( 1 , 'Hello' , 0 ) on connection regress1
[NO_PID]: ECPGexecute line 25: QUERY: insert into test ( id , str , val ) values ( 1 , 'Hello' , 0 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 25 Ok: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 28: QUERY: insert into test ( id , str , val ) values( 2 , 'Hi there' , null ) on connection regress1
[NO_PID]: ECPGexecute line 28: QUERY: insert into test ( id , str , val ) values ( 2 , 'Hi there' , null ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 28 Ok: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 30: QUERY: insert into test ( id , str , val ) values( 3 , 'Good evening' , 5 ) on connection regress1
[NO_PID]: ECPGexecute line 30: QUERY: insert into test ( id , str , val ) values ( 3 , 'Good evening' , 5 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 30 Ok: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
......@@ -42,7 +42,7 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 37: RESULT: 5 offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 42: QUERY: update test set val = null where id = 1 on connection regress1
[NO_PID]: ECPGexecute line 42: QUERY: update test set val = null where id = 1 on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 42 Ok: UPDATE 1
[NO_PID]: sqlca: code: 0, state: 00000
......
/* Processed by ecpg (regression mode) */
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "parser.pgc"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* test parser addition that merges two tokens into one */
#line 1 "regression.h"
#line 6 "parser.pgc"
int main(int argc, char* argv[]) {
/* exec sql begin declare section */
#line 10 "parser.pgc"
int item [ 3 ] , ind [ 3 ] , i ;
/* exec sql end declare section */
#line 11 "parser.pgc"
ECPGdebug(1, stderr);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
#line 14 "parser.pgc"
{ ECPGsetcommit(__LINE__, "on", NULL);}
#line 16 "parser.pgc"
/* exec sql whenever sql_warning sqlprint ; */
#line 17 "parser.pgc"
/* exec sql whenever sqlerror sqlprint ; */
#line 18 "parser.pgc"
{ ECPGdo(__LINE__, 0, 1, NULL, "create table T ( Item1 int , Item2 int ) ", ECPGt_EOIT, ECPGt_EORT);
#line 20 "parser.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
#line 20 "parser.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
#line 20 "parser.pgc"
{ ECPGdo(__LINE__, 0, 1, NULL, "insert into T values ( 1 , null ) ", ECPGt_EOIT, ECPGt_EORT);
#line 22 "parser.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
#line 22 "parser.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
#line 22 "parser.pgc"
{ ECPGdo(__LINE__, 0, 1, NULL, "insert into T values ( 1 , 1 ) ", ECPGt_EOIT, ECPGt_EORT);
#line 23 "parser.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
#line 23 "parser.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
#line 23 "parser.pgc"
{ ECPGdo(__LINE__, 0, 1, NULL, "insert into T values ( 1 , 2 ) ", ECPGt_EOIT, ECPGt_EORT);
#line 24 "parser.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
#line 24 "parser.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
#line 24 "parser.pgc"
{ ECPGdo(__LINE__, 0, 1, NULL, "select Item2 from T order by Item2 nulls last", ECPGt_EOIT,
ECPGt_int,(item),(long)1,(long)3,sizeof(int),
ECPGt_int,(ind),(long)1,(long)3,sizeof(int), ECPGt_EORT);
#line 26 "parser.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
#line 26 "parser.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
#line 26 "parser.pgc"
for (i=0; i<3; i++)
printf("item[%d] = %d\n", i, ind[i] ? -1 : item[i]);
{ ECPGdo(__LINE__, 0, 1, NULL, "drop table T ", ECPGt_EOIT, ECPGt_EORT);
#line 31 "parser.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
#line 31 "parser.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
#line 31 "parser.pgc"
{ ECPGdisconnect(__LINE__, "ALL");
#line 33 "parser.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
#line 33 "parser.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
#line 33 "parser.pgc"
return 0;
}
[NO_PID]: ECPGdebug: set to 1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: 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 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 20 Ok: CREATE TABLE
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 22: QUERY: insert into T values ( 1 , null ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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 on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_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]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 31: QUERY: drop table T on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute 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
item[0] = 1
item[1] = 2
item[2] = -1
......@@ -34,7 +34,7 @@ int main(int argc, char* argv[]) {
ECPGdebug(1, stderr);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
#line 13 "quote.pgc"
......@@ -48,7 +48,7 @@ int main(int argc, char* argv[]) {
#line 17 "quote.pgc"
{ ECPGdo(__LINE__, 0, 1, NULL, "create table \"My_Table\" ( Item1 int , Item2 text ) ", ECPGt_EOIT, ECPGt_EORT);
{ ECPGdo(__LINE__, 0, 1, NULL, "create table \"My_Table\" ( Item1 int , Item2 text ) ", ECPGt_EOIT, ECPGt_EORT);
#line 19 "quote.pgc"
if (sqlca.sqlwarn[0] == 'W') sqlprint();
......
......@@ -4,7 +4,7 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGsetcommit line 15 action = on connection = regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 19: QUERY: create table "My_Table" ( Item1 int , Item2 text ) on connection regress1
[NO_PID]: ECPGexecute line 19: QUERY: create table "My_Table" ( Item1 int , Item2 text ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 19 Ok: CREATE TABLE
[NO_PID]: sqlca: code: 0, state: 00000
......
......@@ -34,7 +34,7 @@ int main(int argc, char* argv[]) {
ECPGdebug(1, stderr);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
#line 13 "show.pgc"
......
......@@ -34,7 +34,7 @@ int main(int argc, char* argv[]) {
ECPGdebug(1, stderr);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
#line 13 "update.pgc"
......@@ -111,7 +111,7 @@ if (sqlca.sqlcode < 0) sqlprint();}
#line 26 "update.pgc"
;
{ ECPGdo(__LINE__, 0, 1, NULL, "select a , b from test order by a", ECPGt_EOIT,
{ ECPGdo(__LINE__, 0, 1, NULL, "select a , b from test order by a ", ECPGt_EOIT,
ECPGt_int,(i1),(long)1,(long)3,sizeof(int),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
ECPGt_int,(i2),(long)1,(long)3,sizeof(int),
......
......@@ -6,15 +6,15 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 18 Ok: CREATE TABLE
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 20: QUERY: insert into test ( a , b ) values( 1 , 1 ) on connection regress1
[NO_PID]: ECPGexecute line 20: QUERY: insert into test ( a , b ) values ( 1 , 1 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 20 Ok: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 21: QUERY: insert into test ( a , b ) values( 2 , 2 ) on connection regress1
[NO_PID]: ECPGexecute line 21: QUERY: insert into test ( a , b ) values ( 2 , 2 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 21 Ok: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 22: QUERY: insert into test ( a , b ) values( 3 , 3 ) on connection regress1
[NO_PID]: ECPGexecute line 22: QUERY: insert into test ( a , b ) values ( 3 , 3 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 22 Ok: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
......@@ -22,7 +22,7 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 24 Ok: UPDATE 3
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 25: QUERY: update test set ( a , b )=( 5 , 5 ) where a = 4 on connection regress1
[NO_PID]: ECPGexecute line 25: QUERY: update test set ( a , b )= ( 5 , 5 ) where a = 4 on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 25 Ok: UPDATE 1
[NO_PID]: sqlca: code: 0, state: 00000
......@@ -30,7 +30,7 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 26 Ok: UPDATE 1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 28: QUERY: select a , b from test order by a on connection regress1
[NO_PID]: ECPGexecute line 28: QUERY: select a , b from test order by a on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 28: Correctly got 3 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
......
......@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
/* setup test_thread table */
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
#line 41 "thread.pgc"
{ ECPGdo(__LINE__, 0, 1, NULL, "drop table test_thread ", ECPGt_EOIT, ECPGt_EORT);}
......@@ -71,7 +71,7 @@ int main(int argc, char *argv[])
{ ECPGtrans(__LINE__, NULL, "commit");}
#line 43 "thread.pgc"
{ ECPGdo(__LINE__, 0, 1, NULL, "create table test_thread ( tstamp timestamp not null default cast( timeofday () as timestamp ) , thread TEXT not null , iteration integer not null , primary key( thread , iteration ) ) ", ECPGt_EOIT, ECPGt_EORT);}
{ ECPGdo(__LINE__, 0, 1, NULL, "create table test_thread ( tstamp timestamp not null default cast( timeofday () as timestamp ) , thread TEXT not null , iteration integer not null , primary key( thread , iteration ) ) ", ECPGt_EOIT, ECPGt_EORT);}
#line 48 "thread.pgc"
{ ECPGtrans(__LINE__, NULL, "commit");}
......@@ -101,7 +101,7 @@ int main(int argc, char *argv[])
free(threads);
/* and check results */
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
#line 72 "thread.pgc"
{ ECPGdo(__LINE__, 0, 1, NULL, "select count (*) from test_thread ", ECPGt_EOIT,
......@@ -144,7 +144,7 @@ void *test_thread(void *arg)
/* exec sql whenever sqlerror sqlprint ; */
#line 94 "thread.pgc"
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , l_connection, 0);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , l_connection, 0);
#line 95 "thread.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
......
......@@ -63,7 +63,7 @@ int main(int argc, char *argv[])
/* setup test_thread table */
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
#line 42 "thread_implicit.pgc"
{ ECPGdo(__LINE__, 0, 1, NULL, "drop table test_thread ", ECPGt_EOIT, ECPGt_EORT);}
......@@ -72,7 +72,7 @@ int main(int argc, char *argv[])
{ ECPGtrans(__LINE__, NULL, "commit");}
#line 44 "thread_implicit.pgc"
{ ECPGdo(__LINE__, 0, 1, NULL, "create table test_thread ( tstamp timestamp not null default cast( timeofday () as timestamp ) , thread TEXT not null , iteration integer not null , primary key( thread , iteration ) ) ", ECPGt_EOIT, ECPGt_EORT);}
{ ECPGdo(__LINE__, 0, 1, NULL, "create table test_thread ( tstamp timestamp not null default cast( timeofday () as timestamp ) , thread TEXT not null , iteration integer not null , primary key( thread , iteration ) ) ", ECPGt_EOIT, ECPGt_EORT);}
#line 49 "thread_implicit.pgc"
{ ECPGtrans(__LINE__, NULL, "commit");}
......@@ -102,7 +102,7 @@ int main(int argc, char *argv[])
free(threads);
/* and check results */
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
#line 73 "thread_implicit.pgc"
{ ECPGdo(__LINE__, 0, 1, NULL, "select count (*) from test_thread ", ECPGt_EOIT,
......@@ -145,7 +145,7 @@ void *test_thread(void *arg)
/* exec sql whenever sqlerror sqlprint ; */
#line 95 "thread_implicit.pgc"
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , l_connection, 0);
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , l_connection, 0);
#line 96 "thread_implicit.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
......
......@@ -16,6 +16,7 @@ TESTS = array array.c \
fetch fetch.c \
func func.c \
indicators indicators.c \
parser parser.c \
quote quote.c \
show show.c \
update update.c
......
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* test parser addition that merges two tokens into one */
EXEC SQL INCLUDE ../regression;
int main(int argc, char* argv[]) {
EXEC SQL BEGIN DECLARE SECTION;
int item[3], ind[3], i;
EXEC SQL END DECLARE SECTION;
ECPGdebug(1, stderr);
EXEC SQL CONNECT TO REGRESSDB1;
EXEC SQL SET AUTOCOMMIT TO ON;
EXEC SQL WHENEVER SQLWARNING SQLPRINT;
EXEC SQL WHENEVER SQLERROR SQLPRINT;
EXEC SQL CREATE TABLE T ( Item1 int, Item2 int );
EXEC SQL INSERT INTO T VALUES ( 1, null );
EXEC SQL INSERT INTO T VALUES ( 1, 1 );
EXEC SQL INSERT INTO T VALUES ( 1, 2 );
EXEC SQL SELECT Item2 INTO :item:ind FROM T ORDER BY Item2 NULLS LAST;
for (i=0; i<3; i++)
printf("item[%d] = %d\n", i, ind[i] ? -1 : item[i]);
EXEC SQL DROP TABLE T;
EXEC SQL DISCONNECT ALL;
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment