- 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.
This commit is contained in:
parent
e6e78187ef
commit
d3e131e062
src/interfaces/ecpg
ChangeLog
ecpglib
pgtypeslib
preproc
test
expected
compat_informix-rnull.ccompat_informix-rnull.stderrcompat_informix-test_informix.ccompat_informix-test_informix.stderrcompat_informix-test_informix2.ccompat_informix-test_informix2.stderrconnect-test2.cconnect-test3.cconnect-test4.cconnect-test5.cpgtypeslib-dt_test.cpgtypeslib-dt_test.stderrpgtypeslib-num_test.cpreproc-comment.cpreproc-define.cpreproc-type.cpreproc-variable.cpreproc-variable.stderrpreproc-whenever.csql-array.csql-binary.csql-binary.stderrsql-code100.csql-code100.stderrsql-copystdout.csql-copystdout.stderrsql-define.csql-define.stderrsql-desc.csql-desc.stderrsql-dynalloc.csql-dynalloc.stderrsql-dynalloc2.csql-dynalloc2.stderrsql-dyntest.csql-dyntest.stderrsql-execute.csql-fetch.csql-fetch.stderrsql-func.csql-func.stderrsql-indicators.csql-indicators.stderrsql-parser.csql-parser.stderrsql-parser.stdoutsql-quote.csql-quote.stderrsql-show.csql-update.csql-update.stderrthread-thread.cthread-thread_implicit.c
sql
@ -2096,48 +2096,48 @@ Mo Aug 14 10:39:59 CEST 2006
|
|||||||
- Fixed a nasty buffer underrun that only occured when using Informix
|
- Fixed a nasty buffer underrun that only occured when using Informix
|
||||||
no_indicator NULL setting on timestamps and intervals.
|
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.
|
- Changed lexer to no longer use the default rule.
|
||||||
- Synced parser and keyword list.
|
- Synced parser and keyword list.
|
||||||
- Fixed parsing of CONNECT statement so it accepts a C string again.
|
- Fixed parsing of CONNECT statement so it accepts a C string again.
|
||||||
- Fixed a buffer overrun that was masked on Linux systems.
|
- 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.
|
- More SoC stuff.
|
||||||
|
|
||||||
Tu 22. Aug 13:54:08 CEST 2006
|
Tu Aug 22 13:54:08 CEST 2006
|
||||||
|
|
||||||
- Descriptor values were quoted twice.
|
- 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.
|
- Replaced double-quote-fix with a hopefully better version.
|
||||||
- Use initializer string length as size for character strings.
|
- Use initializer string length as size for character strings.
|
||||||
- Added ecpg_config.h file that is created via configure.
|
- 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.
|
- Fixed of by one variable size.
|
||||||
- Synced parser.
|
- Synced parser.
|
||||||
|
|
||||||
Su 27. Aug 17:54:36 CEST 2006
|
Su Aug 27 17:54:36 CEST 2006
|
||||||
|
|
||||||
- Enabled single-quoted connection targets.
|
- Enabled single-quoted connection targets.
|
||||||
- Fixed a memory leak/segfault in unsuccessful connection.
|
- 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.
|
- Fixed parser and library to allow empty database names.
|
||||||
- Streamlined connection name parsing.
|
- Streamlined connection name parsing.
|
||||||
|
|
||||||
Su 3. Sep 14:21:29 CEST 2006
|
Su Sep 3 14:21:29 CEST 2006
|
||||||
|
|
||||||
- Synced parser.
|
- Synced parser.
|
||||||
- Added another regression test and fixed tcp test.
|
- 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.
|
- Synced parser.
|
||||||
- Fixed ecpglib trying to read one character after end-of-string.
|
- 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.
|
- Added some interval checks to regression suite.
|
||||||
- Started to cleanup complex tests.
|
- 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.
|
- Completely removed complex tests.
|
||||||
- Added missing constuctor/destructor for interval and date.
|
- 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.
|
- Applied patch by Peter Harris to free auto_mem struct in ECPGconnect.
|
||||||
- Set ecpg library version to 5.2.
|
- Set ecpg library version to 5.2.
|
||||||
- Set ecpg version to 4.2.1.
|
- 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 compiler warning due to unneeded unsigned declaration.
|
||||||
- Removed regression test that triggers those libc precision bugs on some archs.
|
- 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.
|
- Cleaned up va_list handling. Hopefully this now works on all archs.
|
||||||
- Applied Magnus Hagander's patch to take away some compiler warnings.
|
- 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>.
|
- Fixed multibyte handling as reported by <harada.toshi@oss.ntt.co.jp>.
|
||||||
- Set ecpg library version to 5.3.
|
- 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.
|
- Set ecpg version to 4.3.1.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $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
|
#define POSTGRES_ECPG_INTERNAL
|
||||||
#include "postgres_fe.h"
|
#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)
|
if (PQstatus(this->connection) == CONNECTION_BAD)
|
||||||
{
|
{
|
||||||
const char *errmsg = PQerrorMessage(this->connection);
|
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",
|
ECPGlog("connect: could not open database %s on %s port %s %s%s%s%s in line %d\n\t%s\n",
|
||||||
db,
|
db,
|
||||||
|
@ -542,7 +542,7 @@ dttofmtasc_replace(timestamp * ts, date dDate, int dow, struct tm * tm,
|
|||||||
*/
|
*/
|
||||||
case 'g':
|
case 'g':
|
||||||
{
|
{
|
||||||
char *fmt = "%g"; /* Keep compiler quiet about
|
const char *fmt = "%g"; /* Keep compiler quiet about
|
||||||
* 2-digit year */
|
* 2-digit year */
|
||||||
|
|
||||||
tm->tm_mon -= 1;
|
tm->tm_mon -= 1;
|
||||||
@ -744,7 +744,7 @@ dttofmtasc_replace(timestamp * ts, date dDate, int dow, struct tm * tm,
|
|||||||
*/
|
*/
|
||||||
case 'x':
|
case 'x':
|
||||||
{
|
{
|
||||||
char *fmt = "%x"; /* Keep compiler quiet about
|
const char *fmt = "%x"; /* Keep compiler quiet about
|
||||||
* 2-digit year */
|
* 2-digit year */
|
||||||
|
|
||||||
tm->tm_mon -= 1;
|
tm->tm_mon -= 1;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 1998-2007, PostgreSQL Global Development Group
|
# 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
|
endif
|
||||||
override CFLAGS += $(PTHREAD_CFLAGS)
|
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 \
|
keywords.o c_keywords.o ../ecpglib/typename.o descriptor.o variable.o \
|
||||||
$(WIN32RES)
|
$(WIN32RES)
|
||||||
|
|
||||||
@ -59,6 +59,8 @@ endif
|
|||||||
|
|
||||||
c_keywords.o ecpg_keywords.o keywords.o preproc.o: preproc.h
|
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
|
distprep: $(srcdir)/preproc.c $(srcdir)/preproc.h $(srcdir)/pgc.c
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $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. */
|
/* New main for ecpg, the PostgreSQL embedded SQL precompiler. */
|
||||||
/* (C) Michael Meskes <meskes@postgresql.org> Feb 5th, 1998 */
|
/* (C) Michael Meskes <meskes@postgresql.org> Feb 5th, 1998 */
|
||||||
@ -442,7 +442,7 @@ main(int argc, char *const argv[])
|
|||||||
output_line_number();
|
output_line_number();
|
||||||
|
|
||||||
/* and parse the source */
|
/* and parse the source */
|
||||||
yyparse();
|
base_yyparse();
|
||||||
|
|
||||||
/* check if all cursors were indeed opened */
|
/* check if all cursors were indeed opened */
|
||||||
for (ptr = cur; ptr != NULL;)
|
for (ptr = cur; ptr != NULL;)
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* lexical token lookup for reserved words in postgres embedded SQL
|
* lexical token lookup for reserved words in postgres embedded SQL
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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},
|
{"key_member", SQL_KEY_MEMBER},
|
||||||
{"length", SQL_LENGTH},
|
{"length", SQL_LENGTH},
|
||||||
{"long", SQL_LONG},
|
{"long", SQL_LONG},
|
||||||
{"name", SQL_NAME},
|
|
||||||
{"nullable", SQL_NULLABLE},
|
{"nullable", SQL_NULLABLE},
|
||||||
{"octet_length", SQL_OCTET_LENGTH},
|
{"octet_length", SQL_OCTET_LENGTH},
|
||||||
{"open", SQL_OPEN},
|
{"open", SQL_OPEN},
|
||||||
@ -70,7 +69,6 @@ static ScanKeyword ScanKeywords[] = {
|
|||||||
{"stop", SQL_STOP},
|
{"stop", SQL_STOP},
|
||||||
{"struct", SQL_STRUCT},
|
{"struct", SQL_STRUCT},
|
||||||
{"unsigned", SQL_UNSIGNED},
|
{"unsigned", SQL_UNSIGNED},
|
||||||
{"value", SQL_VALUE},
|
|
||||||
{"var", SQL_VAR},
|
{"var", SQL_VAR},
|
||||||
{"whenever", SQL_WHENEVER},
|
{"whenever", SQL_WHENEVER},
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $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
|
#ifndef _ECPG_PREPROC_EXTERN_H
|
||||||
#define _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_statement(char *, int, char *);
|
||||||
extern void output_simple_statement(char *);
|
extern void output_simple_statement(char *);
|
||||||
extern char *hashline_number(void);
|
extern char *hashline_number(void);
|
||||||
extern int yyparse(void);
|
extern int base_yyparse(void);
|
||||||
extern int yylex(void);
|
extern int base_yylex(void);
|
||||||
extern void yyerror(char *);
|
extern void base_yyerror(const char *);
|
||||||
extern void *mm_alloc(size_t), *mm_realloc(void *, size_t);
|
extern void *mm_alloc(size_t), *mm_realloc(void *, size_t);
|
||||||
extern char *mm_strdup(const char *);
|
extern char *mm_strdup(const char *);
|
||||||
extern void mmerror(int, enum errortype, char *,...);
|
extern void mmerror(int, enum errortype, char *,...);
|
||||||
@ -90,6 +90,10 @@ extern void remove_typedefs(int);
|
|||||||
extern void remove_variables(int);
|
extern void remove_variables(int);
|
||||||
extern struct variable *new_variable(const char *, struct ECPGtype *, int);
|
extern struct variable *new_variable(const char *, struct ECPGtype *, int);
|
||||||
extern ScanKeyword *ScanKeywordLookup(char *text);
|
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 */
|
/* return codes */
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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},
|
{"cache", CACHE},
|
||||||
{"called", CALLED},
|
{"called", CALLED},
|
||||||
{"cascade", CASCADE},
|
{"cascade", CASCADE},
|
||||||
|
{"cascaded", CASCADED},
|
||||||
{"case", CASE},
|
{"case", CASE},
|
||||||
{"cast", CAST},
|
{"cast", CAST},
|
||||||
{"chain", CHAIN},
|
{"chain", CHAIN},
|
||||||
@ -82,12 +83,15 @@ static ScanKeyword ScanKeywords[] = {
|
|||||||
{"commit", COMMIT},
|
{"commit", COMMIT},
|
||||||
{"committed", COMMITTED},
|
{"committed", COMMITTED},
|
||||||
{"concurrently", CONCURRENTLY},
|
{"concurrently", CONCURRENTLY},
|
||||||
|
{"concurrently", CONCURRENTLY},
|
||||||
{"connection", CONNECTION},
|
{"connection", CONNECTION},
|
||||||
{"constraint", CONSTRAINT},
|
{"constraint", CONSTRAINT},
|
||||||
{"constraints", CONSTRAINTS},
|
{"constraints", CONSTRAINTS},
|
||||||
|
{"content", CONTENT_P},
|
||||||
{"conversion", CONVERSION_P},
|
{"conversion", CONVERSION_P},
|
||||||
{"convert", CONVERT},
|
{"convert", CONVERT},
|
||||||
{"copy", COPY},
|
{"copy", COPY},
|
||||||
|
{"cost", COST},
|
||||||
{"create", CREATE},
|
{"create", CREATE},
|
||||||
{"createdb", CREATEDB},
|
{"createdb", CREATEDB},
|
||||||
{"createrole", CREATEROLE},
|
{"createrole", CREATEROLE},
|
||||||
@ -118,6 +122,7 @@ static ScanKeyword ScanKeywords[] = {
|
|||||||
{"disable", DISABLE_P},
|
{"disable", DISABLE_P},
|
||||||
{"distinct", DISTINCT},
|
{"distinct", DISTINCT},
|
||||||
{"do", DO},
|
{"do", DO},
|
||||||
|
{"document", DOCUMENT_P},
|
||||||
{"domain", DOMAIN_P},
|
{"domain", DOMAIN_P},
|
||||||
{"double", DOUBLE_P},
|
{"double", DOUBLE_P},
|
||||||
{"drop", DROP},
|
{"drop", DROP},
|
||||||
@ -137,6 +142,7 @@ static ScanKeyword ScanKeywords[] = {
|
|||||||
{"external", EXTERNAL},
|
{"external", EXTERNAL},
|
||||||
{"extract", EXTRACT},
|
{"extract", EXTRACT},
|
||||||
{"false", FALSE_P},
|
{"false", FALSE_P},
|
||||||
|
{"family", FAMILY},
|
||||||
{"fetch", FETCH},
|
{"fetch", FETCH},
|
||||||
{"first", FIRST_P},
|
{"first", FIRST_P},
|
||||||
{"float", FLOAT_P},
|
{"float", FLOAT_P},
|
||||||
@ -212,6 +218,7 @@ static ScanKeyword ScanKeywords[] = {
|
|||||||
{"mode", MODE},
|
{"mode", MODE},
|
||||||
{"month", MONTH_P},
|
{"month", MONTH_P},
|
||||||
{"move", MOVE},
|
{"move", MOVE},
|
||||||
|
{"name", NAME_P},
|
||||||
{"names", NAMES},
|
{"names", NAMES},
|
||||||
{"national", NATIONAL},
|
{"national", NATIONAL},
|
||||||
{"natural", NATURAL},
|
{"natural", NATURAL},
|
||||||
@ -233,6 +240,7 @@ static ScanKeyword ScanKeywords[] = {
|
|||||||
{"nowait", NOWAIT},
|
{"nowait", NOWAIT},
|
||||||
{"null", NULL_P},
|
{"null", NULL_P},
|
||||||
{"nullif", NULLIF},
|
{"nullif", NULLIF},
|
||||||
|
{"nulls", NULLS_P},
|
||||||
{"numeric", NUMERIC},
|
{"numeric", NUMERIC},
|
||||||
{"object", OBJECT_P},
|
{"object", OBJECT_P},
|
||||||
{"of", OF},
|
{"of", OF},
|
||||||
@ -306,6 +314,7 @@ static ScanKeyword ScanKeywords[] = {
|
|||||||
{"smallint", SMALLINT},
|
{"smallint", SMALLINT},
|
||||||
{"some", SOME},
|
{"some", SOME},
|
||||||
{"stable", STABLE},
|
{"stable", STABLE},
|
||||||
|
{"standalone", STANDALONE_P},
|
||||||
{"start", START},
|
{"start", START},
|
||||||
{"statement", STATEMENT},
|
{"statement", STATEMENT},
|
||||||
{"statistics", STATISTICS},
|
{"statistics", STATISTICS},
|
||||||
@ -313,6 +322,7 @@ static ScanKeyword ScanKeywords[] = {
|
|||||||
{"stdout", STDOUT},
|
{"stdout", STDOUT},
|
||||||
{"storage", STORAGE},
|
{"storage", STORAGE},
|
||||||
{"strict", STRICT_P},
|
{"strict", STRICT_P},
|
||||||
|
{"strip", STRIP_P},
|
||||||
{"substring", SUBSTRING},
|
{"substring", SUBSTRING},
|
||||||
{"superuser", SUPERUSER_P},
|
{"superuser", SUPERUSER_P},
|
||||||
{"symmetric", SYMMETRIC},
|
{"symmetric", SYMMETRIC},
|
||||||
@ -349,19 +359,32 @@ static ScanKeyword ScanKeywords[] = {
|
|||||||
{"vacuum", VACUUM},
|
{"vacuum", VACUUM},
|
||||||
{"valid", VALID},
|
{"valid", VALID},
|
||||||
{"validator", VALIDATOR},
|
{"validator", VALIDATOR},
|
||||||
|
{"value", VALUE_P},
|
||||||
{"values", VALUES},
|
{"values", VALUES},
|
||||||
{"varchar", VARCHAR},
|
{"varchar", VARCHAR},
|
||||||
{"varying", VARYING},
|
{"varying", VARYING},
|
||||||
{"verbose", VERBOSE},
|
{"verbose", VERBOSE},
|
||||||
|
{"version", VERSION_P},
|
||||||
{"view", VIEW},
|
{"view", VIEW},
|
||||||
{"volatile", VOLATILE},
|
{"volatile", VOLATILE},
|
||||||
{"when", WHEN},
|
{"when", WHEN},
|
||||||
{"where", WHERE},
|
{"where", WHERE},
|
||||||
|
{"whitespace", WHITESPACE_P},
|
||||||
{"with", WITH},
|
{"with", WITH},
|
||||||
{"without", WITHOUT},
|
{"without", WITHOUT},
|
||||||
{"work", WORK},
|
{"work", WORK},
|
||||||
{"write", WRITE},
|
{"write", WRITE},
|
||||||
|
{"xml", XML_P},
|
||||||
|
{"xmlattributes", XMLATTRIBUTES},
|
||||||
|
{"xmlconcat", XMLCONCAT},
|
||||||
|
{"xmlelement", XMLELEMENT},
|
||||||
|
{"xmlforest", XMLFOREST},
|
||||||
|
{"xmlparse", XMLPARSE},
|
||||||
|
{"xmlpi", XMLPI},
|
||||||
|
{"xmlroot", XMLROOT},
|
||||||
|
{"xmlserialize", XMLSERIALIZE},
|
||||||
{"year", YEAR_P},
|
{"year", YEAR_P},
|
||||||
|
{"yes", YES_P},
|
||||||
{"zone", ZONE},
|
{"zone", ZONE},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
1
src/interfaces/ecpg/preproc/parser/README
Normal file
1
src/interfaces/ecpg/preproc/parser/README
Normal file
@ -0,0 +1 @@
|
|||||||
|
The parse.h file has to be in this directory to comply with the backend's source tree.
|
3
src/interfaces/ecpg/preproc/parser/parse.h
Normal file
3
src/interfaces/ecpg/preproc/parser/parse.h
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#include "extern.h"
|
||||||
|
#include "preproc.h"
|
||||||
|
|
@ -12,7 +12,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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 escape_string_warning;
|
||||||
static bool standard_conforming_strings;
|
static bool standard_conforming_strings;
|
||||||
static bool warn_on_first_escape;
|
static bool warn_on_first_escape;
|
||||||
|
static YY_BUFFER_STATE scanbufhandle;
|
||||||
|
static char *scanbuf;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* literalbuf is used to accumulate literal values when multiple rules
|
* literalbuf is used to accumulate literal values when multiple rules
|
||||||
@ -504,7 +506,7 @@ cppline {space}*#(.*\\{space})*.*{newline}
|
|||||||
/* single quote or dollar sign */
|
/* single quote or dollar sign */
|
||||||
addlitchar(yytext[0]);
|
addlitchar(yytext[0]);
|
||||||
}
|
}
|
||||||
<xdolq><<EOF>> { yyerror("unterminated dollar-quoted string"); }
|
<xdolq><<EOF>> { base_yyerror("unterminated dollar-quoted string"); }
|
||||||
<SQL>{xdstart} {
|
<SQL>{xdstart} {
|
||||||
state_before = YYSTATE;
|
state_before = YYSTATE;
|
||||||
BEGIN(xd);
|
BEGIN(xd);
|
||||||
@ -1347,3 +1349,45 @@ ecpg_isspace(char ch)
|
|||||||
return true;
|
return true;
|
||||||
return false;
|
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);
|
||||||
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.340 2007/02/01 19:10:29 momjian Exp $ */
|
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.341 2007/03/17 19:25:23 meskes Exp $ */
|
||||||
|
|
||||||
/* Copyright comment */
|
/* Copyright comment */
|
||||||
%{
|
%{
|
||||||
@ -6,6 +6,21 @@
|
|||||||
|
|
||||||
#include "extern.h"
|
#include "extern.h"
|
||||||
|
|
||||||
|
/* Location tracking support --- simpler than bison's default */
|
||||||
|
#define YYLLOC_DEFAULT(Current, Rhs, N) \
|
||||||
|
do { \
|
||||||
|
if (N) \
|
||||||
|
(Current) = (Rhs)[1]; \
|
||||||
|
else \
|
||||||
|
(Current) = (Rhs)[0]; \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The %name-prefix option below will make bison call base_yylex, but we
|
||||||
|
* really want it to call filtered_base_yylex (see parser.c).
|
||||||
|
*/
|
||||||
|
#define base_yylex filtered_base_yylex
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Variables containing simple states.
|
* Variables containing simple states.
|
||||||
*/
|
*/
|
||||||
@ -311,6 +326,9 @@ add_additional_variables(char *name, bool insert)
|
|||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
%name-prefix="base_yy"
|
||||||
|
%locations
|
||||||
|
|
||||||
%union {
|
%union {
|
||||||
double dval;
|
double dval;
|
||||||
char *str;
|
char *str;
|
||||||
@ -334,12 +352,12 @@ add_additional_variables(char *name, bool insert)
|
|||||||
SQL_DESCRIPTOR SQL_DISCONNECT SQL_ENUM SQL_FOUND
|
SQL_DESCRIPTOR SQL_DISCONNECT SQL_ENUM SQL_FOUND
|
||||||
SQL_FREE SQL_GO SQL_GOTO SQL_IDENTIFIED
|
SQL_FREE SQL_GO SQL_GOTO SQL_IDENTIFIED
|
||||||
SQL_INDICATOR SQL_KEY_MEMBER SQL_LENGTH
|
SQL_INDICATOR SQL_KEY_MEMBER SQL_LENGTH
|
||||||
SQL_LONG SQL_NAME SQL_NULLABLE SQL_OCTET_LENGTH
|
SQL_LONG SQL_NULLABLE SQL_OCTET_LENGTH
|
||||||
SQL_OPEN SQL_OUTPUT SQL_REFERENCE
|
SQL_OPEN SQL_OUTPUT SQL_REFERENCE
|
||||||
SQL_RETURNED_LENGTH SQL_RETURNED_OCTET_LENGTH SQL_SCALE
|
SQL_RETURNED_LENGTH SQL_RETURNED_OCTET_LENGTH SQL_SCALE
|
||||||
SQL_SECTION SQL_SHORT SQL_SIGNED SQL_SQL SQL_SQLERROR
|
SQL_SECTION SQL_SHORT SQL_SIGNED SQL_SQL SQL_SQLERROR
|
||||||
SQL_SQLPRINT SQL_SQLWARNING SQL_START SQL_STOP
|
SQL_SQLPRINT SQL_SQLWARNING SQL_START SQL_STOP
|
||||||
SQL_STRUCT SQL_UNSIGNED SQL_VALUE SQL_VAR SQL_WHENEVER
|
SQL_STRUCT SQL_UNSIGNED SQL_VAR SQL_WHENEVER
|
||||||
|
|
||||||
/* C token */
|
/* C token */
|
||||||
%token S_ADD S_AND S_ANYTHING S_AUTO S_CONST S_DEC S_DIV
|
%token S_ADD S_AND S_ANYTHING S_AUTO S_CONST S_DEC S_DIV
|
||||||
@ -362,18 +380,19 @@ add_additional_variables(char *name, bool insert)
|
|||||||
CACHE CALLED CASCADE CASCADED CASE CAST CHAIN CHAR_P
|
CACHE CALLED CASCADE CASCADED CASE CAST CHAIN CHAR_P
|
||||||
CHARACTER CHARACTERISTICS CHECK CHECKPOINT CLASS CLOSE
|
CHARACTER CHARACTERISTICS CHECK CHECKPOINT CLASS CLOSE
|
||||||
CLUSTER COALESCE COLLATE COLUMN COMMENT COMMIT
|
CLUSTER COALESCE COLLATE COLUMN COMMENT COMMIT
|
||||||
COMMITTED CONCURRENTLY CONNECTION CONSTRAINT CONSTRAINTS CONVERSION_P CONVERT COPY CREATE CREATEDB
|
COMMITTED CONCURRENTLY CONNECTION CONSTRAINT CONSTRAINTS
|
||||||
|
CONTENT_P CONVERSION_P CONVERT COPY COST CREATE CREATEDB
|
||||||
CREATEROLE CREATEUSER CROSS CSV CURRENT_DATE CURRENT_ROLE CURRENT_TIME
|
CREATEROLE CREATEUSER CROSS CSV CURRENT_DATE CURRENT_ROLE CURRENT_TIME
|
||||||
CURRENT_TIMESTAMP CURRENT_USER CURSOR CYCLE
|
CURRENT_TIMESTAMP CURRENT_USER CURSOR CYCLE
|
||||||
|
|
||||||
DATABASE DAY_P DEALLOCATE DEC DECIMAL_P DECLARE DEFAULT DEFAULTS
|
DATABASE DAY_P DEALLOCATE DEC DECIMAL_P DECLARE DEFAULT DEFAULTS
|
||||||
DEFERRABLE DEFERRED DEFINER DELETE_P DELIMITER DELIMITERS
|
DEFERRABLE DEFERRED DEFINER DELETE_P DELIMITER DELIMITERS
|
||||||
DESC DISABLE_P DISTINCT DO DOMAIN_P DOUBLE_P DROP
|
DESC DISABLE_P DISTINCT DO DOCUMENT_P DOMAIN_P DOUBLE_P DROP
|
||||||
|
|
||||||
EACH ELSE ENABLE_P ENCODING ENCRYPTED END_P ESCAPE EXCEPT EXCLUSIVE EXCLUDING
|
EACH ELSE ENABLE_P ENCODING ENCRYPTED END_P ESCAPE EXCEPT EXCLUSIVE EXCLUDING
|
||||||
EXECUTE EXISTS EXPLAIN EXTERNAL EXTRACT
|
EXECUTE EXISTS EXPLAIN EXTERNAL EXTRACT
|
||||||
|
|
||||||
FALSE_P FETCH FIRST_P FLOAT_P FOR FORCE FOREIGN FORWARD FREEZE FROM
|
FALSE_P FAMILY FETCH FIRST_P FLOAT_P FOR FORCE FOREIGN FORWARD FREEZE FROM
|
||||||
FULL FUNCTION
|
FULL FUNCTION
|
||||||
|
|
||||||
GET GLOBAL GRANT GRANTED GREATEST GROUP_P
|
GET GLOBAL GRANT GRANTED GREATEST GROUP_P
|
||||||
@ -395,9 +414,9 @@ add_additional_variables(char *name, bool insert)
|
|||||||
|
|
||||||
MATCH MAXVALUE MINUTE_P MINVALUE MODE MONTH_P MOVE
|
MATCH MAXVALUE MINUTE_P MINVALUE MODE MONTH_P MOVE
|
||||||
|
|
||||||
NAMES NATIONAL NATURAL NCHAR NEW NEXT NO NOCREATEDB
|
NAME_P NAMES NATIONAL NATURAL NCHAR NEW NEXT NO NOCREATEDB
|
||||||
NOCREATEROLE NOCREATEUSER NOINHERIT NOLOGIN_P NONE NOSUPERUSER
|
NOCREATEROLE NOCREATEUSER NOINHERIT NOLOGIN_P NONE NOSUPERUSER
|
||||||
NOT NOTHING NOTIFY NOTNULL NOWAIT NULL_P NULLIF NUMERIC
|
NOT NOTHING NOTIFY NOTNULL NOWAIT NULL_P NULLIF NULLS_P NUMERIC
|
||||||
|
|
||||||
OBJECT_P OF OFF OFFSET OIDS OLD ON ONLY OPERATOR OPTION OR ORDER
|
OBJECT_P OF OFF OFFSET OIDS OLD ON ONLY OPERATOR OPTION OR ORDER
|
||||||
OUT_P OUTER_P OVERLAPS OVERLAY OWNED OWNER
|
OUT_P OUTER_P OVERLAPS OVERLAY OWNED OWNER
|
||||||
@ -414,9 +433,9 @@ add_additional_variables(char *name, bool insert)
|
|||||||
|
|
||||||
SAVEPOINT SCHEMA SCROLL SECOND_P SECURITY SELECT SEQUENCE
|
SAVEPOINT SCHEMA SCROLL SECOND_P SECURITY SELECT SEQUENCE
|
||||||
SERIALIZABLE SESSION SESSION_USER SET SETOF SHARE
|
SERIALIZABLE SESSION SESSION_USER SET SETOF SHARE
|
||||||
SHOW SIMILAR SIMPLE SMALLINT SOME STABLE START STATEMENT
|
SHOW SIMILAR SIMPLE SMALLINT SOME STABLE STANDALONE_P START STATEMENT
|
||||||
STATISTICS STDIN STDOUT STORAGE STRICT_P SUBSTRING SUPERUSER_P SYMMETRIC
|
STATISTICS STDIN STDOUT STORAGE STRICT_P STRIP_P SUBSTRING SUPERUSER_P
|
||||||
SYSID SYSTEM_P
|
SYMMETRIC SYSID SYSTEM_P
|
||||||
|
|
||||||
TABLE TABLESPACE TEMP TEMPLATE TEMPORARY THEN TIME TIMESTAMP TO
|
TABLE TABLESPACE TEMP TEMPLATE TEMPORARY THEN TIME TIMESTAMP TO
|
||||||
TRAILING TRANSACTION TREAT TRIGGER TRIM TRUE_P TRUNCATE TRUSTED TYPE_P
|
TRAILING TRANSACTION TREAT TRIGGER TRIM TRUE_P TRUNCATE TRUSTED TYPE_P
|
||||||
@ -424,16 +443,22 @@ add_additional_variables(char *name, bool insert)
|
|||||||
UNCOMMITTED UNENCRYPTED UNION UNIQUE UNKNOWN UNLISTEN UNTIL
|
UNCOMMITTED UNENCRYPTED UNION UNIQUE UNKNOWN UNLISTEN UNTIL
|
||||||
UPDATE USER USING
|
UPDATE USER USING
|
||||||
|
|
||||||
VACUUM VALID VALIDATOR VALUES VARCHAR VARYING VERBOSE VIEW VOLATILE
|
VACUUM VALID VALIDATOR VALUE_P VALUES VARCHAR VARYING
|
||||||
WHEN WHERE WITH WITHOUT WORK WRITE
|
VERBOSE VERSION_P VIEW VOLATILE
|
||||||
YEAR_P
|
WHEN WHERE WHITESPACE_P WITH WITHOUT WORK WRITE
|
||||||
|
|
||||||
|
XML_P XMLATTRIBUTES XMLCONCAT XMLELEMENT XMLFOREST XMLPARSE
|
||||||
|
XMLPI XMLROOT XMLSERIALIZE
|
||||||
|
|
||||||
|
YEAR_P YES_P
|
||||||
|
|
||||||
ZONE
|
ZONE
|
||||||
|
|
||||||
/* The grammar thinks these are keywords, but they are not in the keywords.c
|
/* The grammar thinks these are keywords, but they are not in the keywords.c
|
||||||
* list and so can never be entered directly. The filter in parser.c
|
* list and so can never be entered directly. The filter in parser.c
|
||||||
* creates these tokens when required.
|
* creates these tokens when required.
|
||||||
*/
|
*/
|
||||||
%token WITH_CASCADED WITH_LOCAL WITH_CHECK
|
%token NULLS_FIRST NULLS_LAST WITH_CASCADED WITH_LOCAL WITH_CHECK
|
||||||
|
|
||||||
/* Special token types, not actually keywords - see the "lex" file */
|
/* Special token types, not actually keywords - see the "lex" file */
|
||||||
%token <str> IDENT SCONST Op CSTRING CVARIABLE CPP_LINE IP BCONST XCONST DOLCONST
|
%token <str> IDENT SCONST Op CSTRING CVARIABLE CPP_LINE IP BCONST XCONST DOLCONST
|
||||||
@ -470,6 +495,8 @@ add_additional_variables(char *name, bool insert)
|
|||||||
%left TYPECAST
|
%left TYPECAST
|
||||||
%left '.'
|
%left '.'
|
||||||
%left JOIN CROSS LEFT FULL RIGHT INNER_P NATURAL
|
%left JOIN CROSS LEFT FULL RIGHT INNER_P NATURAL
|
||||||
|
/* kluge to keep xml_whitespace_option from causing shift/reduce conflicts */
|
||||||
|
%right PRESERVE STRIP_P
|
||||||
|
|
||||||
%type <str> Iconst Fconst Sconst TransactionStmt CreateStmt RoleId
|
%type <str> Iconst Fconst Sconst TransactionStmt CreateStmt RoleId
|
||||||
%type <str> CreateAsElement OptCreateAs CreateAsList CreateAsStmt
|
%type <str> CreateAsElement OptCreateAs CreateAsList CreateAsStmt
|
||||||
@ -477,17 +504,17 @@ add_additional_variables(char *name, bool insert)
|
|||||||
%type <str> key_match ColLabel SpecialRuleRelation ColId columnDef
|
%type <str> key_match ColLabel SpecialRuleRelation ColId columnDef
|
||||||
%type <str> ColConstraint ColConstraintElem drop_type Bconst Iresult
|
%type <str> ColConstraint ColConstraintElem drop_type Bconst Iresult
|
||||||
%type <str> TableConstraint OptTableElementList Xconst opt_transaction
|
%type <str> TableConstraint OptTableElementList Xconst opt_transaction
|
||||||
%type <str> ConstraintElem key_actions ColQualList type_name
|
%type <str> ConstraintElem key_actions ColQualList
|
||||||
%type <str> target_list target_el alias_clause
|
%type <str> target_list target_el alias_clause type_func_name_keyword
|
||||||
%type <str> qualified_name database_name alter_using
|
%type <str> qualified_name database_name alter_using type_function_name
|
||||||
%type <str> access_method attr_name index_name name func_name
|
%type <str> access_method attr_name index_name name func_name
|
||||||
%type <str> file_name AexprConst c_expr ConstTypename var_list
|
%type <str> file_name AexprConst c_expr ConstTypename var_list
|
||||||
%type <str> a_expr b_expr TruncateStmt CommentStmt OnCommitOption opt_by
|
%type <str> a_expr b_expr TruncateStmt CommentStmt OnCommitOption opt_by
|
||||||
%type <str> opt_indirection expr_list extract_list extract_arg
|
%type <str> opt_indirection expr_list extract_list extract_arg
|
||||||
%type <str> position_list substr_list substr_from alter_column_default
|
%type <str> position_list substr_list substr_from alter_column_default
|
||||||
%type <str> trim_list in_expr substr_for attrs TableFuncElement
|
%type <str> trim_list in_expr substr_for attrs TableFuncElement
|
||||||
%type <str> Typename SimpleTypename Numeric opt_float opt_numeric
|
%type <str> Typename SimpleTypename Numeric opt_float
|
||||||
%type <str> opt_decimal Character character opt_varying opt_charset
|
%type <str> Character character opt_varying opt_charset
|
||||||
%type <str> opt_timezone opt_interval table_ref fetch_direction
|
%type <str> opt_timezone opt_interval table_ref fetch_direction
|
||||||
%type <str> ConstDatetime AlterDomainStmt AlterSeqStmt alter_rel_cmds
|
%type <str> ConstDatetime AlterDomainStmt AlterSeqStmt alter_rel_cmds
|
||||||
%type <str> SelectStmt into_clause OptTemp ConstraintAttributeSpec
|
%type <str> SelectStmt into_clause OptTemp ConstraintAttributeSpec
|
||||||
@ -544,7 +571,7 @@ add_additional_variables(char *name, bool insert)
|
|||||||
%type <str> select_limit CheckPointStmt ECPGColId old_aggr_list
|
%type <str> select_limit CheckPointStmt ECPGColId old_aggr_list
|
||||||
%type <str> OptSchemaName OptSchemaEltList schema_stmt opt_drop_behavior
|
%type <str> OptSchemaName OptSchemaEltList schema_stmt opt_drop_behavior
|
||||||
%type <str> handler_name any_name_list any_name opt_as insert_column_list
|
%type <str> handler_name any_name_list any_name opt_as insert_column_list
|
||||||
%type <str> columnref function_name values_clause AllConstVar
|
%type <str> columnref values_clause AllConstVar
|
||||||
%type <str> insert_column_item DropRuleStmt ctext_expr
|
%type <str> insert_column_item DropRuleStmt ctext_expr
|
||||||
%type <str> createfunc_opt_item set_rest var_list_or_default alter_rel_cmd
|
%type <str> createfunc_opt_item set_rest var_list_or_default alter_rel_cmd
|
||||||
%type <str> CreateFunctionStmt createfunc_opt_list func_table
|
%type <str> CreateFunctionStmt createfunc_opt_list func_table
|
||||||
@ -575,9 +602,9 @@ add_additional_variables(char *name, bool insert)
|
|||||||
%type <str> ECPGAllocateDescr ECPGDeallocateDescr symbol opt_output
|
%type <str> ECPGAllocateDescr ECPGDeallocateDescr symbol opt_output
|
||||||
%type <str> ECPGGetDescriptorHeader ECPGColLabel single_var_declaration
|
%type <str> ECPGGetDescriptorHeader ECPGColLabel single_var_declaration
|
||||||
%type <str> reserved_keyword unreserved_keyword ecpg_interval opt_ecpg_using
|
%type <str> reserved_keyword unreserved_keyword ecpg_interval opt_ecpg_using
|
||||||
%type <str> col_name_keyword func_name_keyword precision opt_scale
|
%type <str> col_name_keyword precision opt_scale
|
||||||
%type <str> ECPGTypeName using_list ECPGColLabelCommon UsingConst
|
%type <str> ECPGTypeName using_list ECPGColLabelCommon UsingConst
|
||||||
%type <str> using_descriptor into_descriptor
|
%type <str> using_descriptor into_descriptor opt_nulls_order opt_asc_desc
|
||||||
%type <str> prepared_name struct_union_type_with_symbol OptConsTableSpace
|
%type <str> prepared_name struct_union_type_with_symbol OptConsTableSpace
|
||||||
%type <str> ECPGunreserved ECPGunreserved_interval cvariable opt_bit_field
|
%type <str> ECPGunreserved ECPGunreserved_interval cvariable opt_bit_field
|
||||||
%type <str> AlterOwnerStmt OptTableSpaceOwner CreateTableSpaceStmt
|
%type <str> AlterOwnerStmt OptTableSpaceOwner CreateTableSpaceStmt
|
||||||
@ -587,10 +614,14 @@ add_additional_variables(char *name, bool insert)
|
|||||||
%type <str> opt_grant_admin_option AlterFunctionStmt alterfunc_opt_list opt_restrict
|
%type <str> opt_grant_admin_option AlterFunctionStmt alterfunc_opt_list opt_restrict
|
||||||
%type <str> AlterObjectSchemaStmt alterdb_opt_list for_locking_clause opt_for_locking_clause
|
%type <str> AlterObjectSchemaStmt alterdb_opt_list for_locking_clause opt_for_locking_clause
|
||||||
%type <str> locked_rels_list opt_granted_by RevokeRoleStmt alterdb_opt_item using_clause
|
%type <str> locked_rels_list opt_granted_by RevokeRoleStmt alterdb_opt_item using_clause
|
||||||
%type <str> GrantRoleStmt opt_asymmetric aggr_args aggr_args_list old_aggr_definition
|
%type <str> GrantRoleStmt opt_asymmetric aggr_args old_aggr_definition
|
||||||
%type <str> old_aggr_elem for_locking_items TableLikeOptionList TableLikeOption
|
%type <str> old_aggr_elem for_locking_items TableLikeOptionList TableLikeOption
|
||||||
%type <str> set_target_list set_clause_list set_clause multiple_set_clause
|
%type <str> set_target_list set_clause_list set_clause multiple_set_clause
|
||||||
%type <str> ctext_expr_list ctext_row single_set_clause set_target
|
%type <str> ctext_expr_list ctext_row single_set_clause set_target opt_type_modifiers
|
||||||
|
%type <str> opclass_drop_list opclass_drop DropOpFamilyStmt opt_opfamily
|
||||||
|
%type <str> CreateOpFamilyStmt AlterOpFamilyStmt create_as_target
|
||||||
|
%type <str> xml_attributes xml_attribute_list document_or_content xml_whitespace_option
|
||||||
|
%type <str> opt_xml_root_standalone xml_root_version xml_attribute_el
|
||||||
|
|
||||||
%type <struct_union> s_struct_union_symbol
|
%type <struct_union> s_struct_union_symbol
|
||||||
|
|
||||||
@ -691,6 +722,8 @@ stmt: AlterDatabaseStmt { output_statement($1, 0, connection); }
|
|||||||
| CreateGroupStmt { output_statement($1, 0, connection); }
|
| CreateGroupStmt { output_statement($1, 0, connection); }
|
||||||
| CreatePLangStmt { output_statement($1, 0, connection); }
|
| CreatePLangStmt { output_statement($1, 0, connection); }
|
||||||
| CreateOpClassStmt { output_statement($1, 0, connection); }
|
| CreateOpClassStmt { output_statement($1, 0, connection); }
|
||||||
|
| CreateOpFamilyStmt { output_statement($1, 0, connection); }
|
||||||
|
| AlterOpFamilyStmt { output_statement($1, 0, connection); }
|
||||||
| CreateRoleStmt { output_statement($1, 0, connection); }
|
| CreateRoleStmt { output_statement($1, 0, connection); }
|
||||||
| CreateSchemaStmt { output_statement($1, 0, connection); }
|
| CreateSchemaStmt { output_statement($1, 0, connection); }
|
||||||
| CreateSeqStmt { output_statement($1, 0, connection); }
|
| CreateSeqStmt { output_statement($1, 0, connection); }
|
||||||
@ -707,11 +740,12 @@ stmt: AlterDatabaseStmt { output_statement($1, 0, connection); }
|
|||||||
| DropCastStmt { output_statement($1, 0, connection); }
|
| DropCastStmt { output_statement($1, 0, connection); }
|
||||||
| DropGroupStmt { output_statement($1, 0, connection); }
|
| DropGroupStmt { output_statement($1, 0, connection); }
|
||||||
| DropOpClassStmt { output_statement($1, 0, connection); }
|
| DropOpClassStmt { output_statement($1, 0, connection); }
|
||||||
|
| DropOpFamilyStmt { output_statement($1, 0, connection); }
|
||||||
| DropOwnedStmt { output_statement($1, 0, connection); }
|
| DropOwnedStmt { output_statement($1, 0, connection); }
|
||||||
| DropPLangStmt { output_statement($1, 0, connection); }
|
| DropPLangStmt { output_statement($1, 0, connection); }
|
||||||
| DropRoleStmt { output_statement($1, 0, connection); }
|
| DropRoleStmt { output_statement($1, 0, connection); }
|
||||||
| DropRuleStmt { output_statement($1, 0, connection); }
|
| DropRuleStmt { output_statement($1, 0, connection); }
|
||||||
| DropStmt { output_statement($1, 0, connection); }
|
| DropStmt { output_statement($1, 0, connection); }
|
||||||
| DropTableSpaceStmt { output_statement($1, 0, connection); }
|
| DropTableSpaceStmt { output_statement($1, 0, connection); }
|
||||||
| DropTrigStmt { output_statement($1, 0, connection); }
|
| DropTrigStmt { output_statement($1, 0, connection); }
|
||||||
| DropUserStmt { output_statement($1, 0, connection); }
|
| DropUserStmt { output_statement($1, 0, connection); }
|
||||||
@ -1134,6 +1168,8 @@ set_rest: var_name TO var_list_or_default
|
|||||||
{ $$ = cat2_str(make_str("session authorization"), $3); }
|
{ $$ = cat2_str(make_str("session authorization"), $3); }
|
||||||
| SESSION AUTHORIZATION DEFAULT
|
| SESSION AUTHORIZATION DEFAULT
|
||||||
{ $$ = make_str("session authorization default"); }
|
{ $$ = make_str("session authorization default"); }
|
||||||
|
| XML_P OPTION document_or_content
|
||||||
|
{ $$ = cat2_str(make_str("xml option"), $3); }
|
||||||
;
|
;
|
||||||
|
|
||||||
var_name: ECPGColId { $$ = $1; }
|
var_name: ECPGColId { $$ = $1; }
|
||||||
@ -1668,14 +1704,20 @@ OptConsTableSpace: USING INDEX TABLESPACE name { $$ = cat2_str(make_str("using i
|
|||||||
* SELECT ... INTO.
|
* SELECT ... INTO.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
CreateAsStmt: CREATE OptTemp TABLE qualified_name OptCreateAs OptWith OnCommitOption OptTableSpace AS
|
CreateAsStmt: CREATE OptTemp TABLE create_as_target AS
|
||||||
{ FoundInto = 0; }
|
{ FoundInto = 0; }
|
||||||
SelectStmt
|
SelectStmt
|
||||||
{
|
{
|
||||||
if (FoundInto == 1)
|
if (FoundInto == 1)
|
||||||
mmerror(PARSE_ERROR, ET_ERROR, "CREATE TABLE / AS SELECT cannot specify INTO");
|
mmerror(PARSE_ERROR, ET_ERROR, "CREATE TABLE / AS SELECT cannot specify INTO");
|
||||||
|
|
||||||
$$ = cat_str(10, make_str("create"), $2, make_str("table"), $4, $5, $6, $7, $8, make_str("as"), $11);
|
$$ = cat_str(6, make_str("create"), $2, make_str("table"), $4, make_str("as"), $7);
|
||||||
|
}
|
||||||
|
;
|
||||||
|
|
||||||
|
create_as_target: qualified_name OptCreateAs OptWith OnCommitOption OptTableSpace
|
||||||
|
{
|
||||||
|
$$ = cat_str(5, $1, $2, $3, $4, $5);
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -1983,21 +2025,15 @@ def_elem: ColLabel '=' def_arg { $$ = cat_str(3, $1, make_str("="), $3); }
|
|||||||
|
|
||||||
/* Note: any simple identifier will be returned as a type name! */
|
/* Note: any simple identifier will be returned as a type name! */
|
||||||
def_arg: func_type { $$ = $1; }
|
def_arg: func_type { $$ = $1; }
|
||||||
| func_name_keyword { $$ = $1; }
|
|
||||||
| reserved_keyword { $$ = $1; }
|
| reserved_keyword { $$ = $1; }
|
||||||
| qual_all_Op { $$ = $1; }
|
| qual_all_Op { $$ = $1; }
|
||||||
| AllConst { $$ = $1; }
|
| AllConst { $$ = $1; }
|
||||||
;
|
;
|
||||||
|
|
||||||
aggr_args: '(' aggr_args_list ')' { $$ = cat_str(3, make_str("("), $2, make_str(")")); }
|
aggr_args: '(' type_list ')' { $$ = cat_str(3, make_str("("), $2, make_str(")")); }
|
||||||
| '(' '*' ')' { $$ = make_str("(*)"); }
|
| '(' '*' ')' { $$ = make_str("(*)"); }
|
||||||
;
|
;
|
||||||
|
|
||||||
aggr_args_list:
|
|
||||||
Typename { $$ = $1; }
|
|
||||||
| aggr_args_list ',' Typename { $$ = cat_str(3, $1, make_str(","), $3); }
|
|
||||||
;
|
|
||||||
|
|
||||||
old_aggr_definition: '(' old_aggr_list ')' { $$ = cat_str(3, make_str("("), $2, make_str(")")); }
|
old_aggr_definition: '(' old_aggr_list ')' { $$ = cat_str(3, make_str("("), $2, make_str(")")); }
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -2010,9 +2046,9 @@ old_aggr_elem: ident '=' def_arg { $$ = cat_str(3, $1, make_str("="), $3); }
|
|||||||
|
|
||||||
|
|
||||||
CreateOpClassStmt: CREATE OPERATOR CLASS any_name opt_default FOR TYPE_P Typename
|
CreateOpClassStmt: CREATE OPERATOR CLASS any_name opt_default FOR TYPE_P Typename
|
||||||
USING access_method AS opclass_item_list
|
USING access_method opt_opfamily AS opclass_item_list
|
||||||
{
|
{
|
||||||
$$ = cat_str(9, make_str("create operator class"), $4, $5, make_str("for type"), $8, make_str("using"), $10, make_str("as"), $12);
|
$$ = cat_str(10, make_str("create operator class"), $4, $5, make_str("for type"), $8, make_str("using"), $10, $11, make_str("as"), $13);
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -2026,6 +2062,8 @@ opclass_item: OPERATOR PosIntConst any_operator opt_recheck
|
|||||||
{ $$ = cat_str(7, make_str("operator"), $2, $3, make_str("("), $5, make_str(")"), $7); }
|
{ $$ = cat_str(7, make_str("operator"), $2, $3, make_str("("), $5, make_str(")"), $7); }
|
||||||
| FUNCTION PosIntConst func_name func_args
|
| FUNCTION PosIntConst func_name func_args
|
||||||
{ $$ = cat_str(4, make_str("function"), $2, $3, $4); }
|
{ $$ = cat_str(4, make_str("function"), $2, $3, $4); }
|
||||||
|
| FUNCTION PosIntConst '(' type_list ')' func_name func_args
|
||||||
|
{ $$ = cat_str(7, make_str("function"), $2, make_str("("), $4, make_str(")"), $6, $7); }
|
||||||
| STORAGE Typename
|
| STORAGE Typename
|
||||||
{ $$ = cat2_str(make_str("storage"), $2); }
|
{ $$ = cat2_str(make_str("storage"), $2); }
|
||||||
;
|
;
|
||||||
@ -2034,16 +2072,47 @@ opt_default: DEFAULT { $$ = make_str("default"); }
|
|||||||
| /*EMPTY*/ { $$ = EMPTY; }
|
| /*EMPTY*/ { $$ = EMPTY; }
|
||||||
;
|
;
|
||||||
|
|
||||||
|
opt_opfamily: FAMILY any_name { $$ = cat2_str(make_str("family"), $2); }
|
||||||
|
| /*EMPTY*/ { $$ = EMPTY; }
|
||||||
|
;
|
||||||
|
|
||||||
opt_recheck: RECHECK { $$ = make_str("recheck"); }
|
opt_recheck: RECHECK { $$ = make_str("recheck"); }
|
||||||
| /*EMPTY*/ { $$ = EMPTY; }
|
| /*EMPTY*/ { $$ = EMPTY; }
|
||||||
;
|
;
|
||||||
|
|
||||||
|
CreateOpFamilyStmt: CREATE OPERATOR FAMILY any_name USING access_method
|
||||||
|
{ $$ = cat_str(4, make_str("create operator family"), $4, make_str("using"), $6); }
|
||||||
|
;
|
||||||
|
|
||||||
|
AlterOpFamilyStmt: ALTER OPERATOR FAMILY any_name USING access_method ADD_P opclass_item_list
|
||||||
|
{ $$ = cat_str(6, make_str("alter operator family"), $4, make_str("using"), $6, make_str("add"), $8); }
|
||||||
|
| ALTER OPERATOR FAMILY any_name USING access_method DROP opclass_drop_list
|
||||||
|
{ $$ = cat_str(6, make_str("alter operator family"), $4, make_str("using"), $6, make_str("drop"), $8); }
|
||||||
|
;
|
||||||
|
|
||||||
|
opclass_drop_list: opclass_drop { $$ = $1; }
|
||||||
|
| opclass_drop_list ',' opclass_drop { $$ = cat_str(3, $1, make_str(","), $3); }
|
||||||
|
;
|
||||||
|
|
||||||
|
opclass_drop:
|
||||||
|
OPERATOR PosIntConst '(' type_list ')'
|
||||||
|
{ $$ = cat_str(5, make_str("operator"), $2, make_str("("), $4, make_str(")")); }
|
||||||
|
| FUNCTION PosIntConst '(' type_list ')'
|
||||||
|
{ $$ = cat_str(5, make_str("function"), $2, make_str("("), $4, make_str(")")); }
|
||||||
|
;
|
||||||
|
|
||||||
DropOpClassStmt: DROP OPERATOR CLASS any_name USING access_method opt_drop_behavior
|
DropOpClassStmt: DROP OPERATOR CLASS any_name USING access_method opt_drop_behavior
|
||||||
{ $$ = cat_str(5,make_str("drop operator class"), $4, make_str("using"), $6, $7); }
|
{ $$ = cat_str(5,make_str("drop operator class"), $4, make_str("using"), $6, $7); }
|
||||||
| DROP OPERATOR CLASS IF_P EXISTS any_name USING access_method opt_drop_behavior
|
| DROP OPERATOR CLASS IF_P EXISTS any_name USING access_method opt_drop_behavior
|
||||||
{ $$ = cat_str(5,make_str("drop operator class if exists"), $6, make_str("using"), $8, $9); }
|
{ $$ = cat_str(5,make_str("drop operator class if exists"), $6, make_str("using"), $8, $9); }
|
||||||
;
|
;
|
||||||
|
|
||||||
|
DropOpFamilyStmt: DROP OPERATOR FAMILY any_name USING access_method opt_drop_behavior
|
||||||
|
{ $$ = cat_str(5,make_str("drop operator family"), $4, make_str("using"), $6, $7); }
|
||||||
|
| DROP OPERATOR FAMILY IF_P EXISTS any_name USING access_method opt_drop_behavior
|
||||||
|
{ $$ = cat_str(5,make_str("drop operator family if exists"), $6, make_str("using"), $8, $9); }
|
||||||
|
;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
* QUERY:
|
* QUERY:
|
||||||
@ -2203,6 +2272,8 @@ CommentStmt: COMMENT ON comment_type name IS comment_text
|
|||||||
{ $$ = cat_str(4, make_str("comment on rule"), $4, make_str("is"), $6); }
|
{ $$ = cat_str(4, make_str("comment on rule"), $4, make_str("is"), $6); }
|
||||||
| COMMENT ON OPERATOR CLASS any_name USING access_method IS comment_text
|
| COMMENT ON OPERATOR CLASS any_name USING access_method IS comment_text
|
||||||
{ $$ = cat_str(6, make_str("comment on operator class"), $5, make_str("using"), $7, make_str("is"), $9); }
|
{ $$ = cat_str(6, make_str("comment on operator class"), $5, make_str("using"), $7, make_str("is"), $9); }
|
||||||
|
| COMMENT ON OPERATOR FAMILY any_name USING access_method IS comment_text
|
||||||
|
{ $$ = cat_str(6, make_str("comment on operator family"), $5, make_str("using"), $7, make_str("is"), $9); }
|
||||||
| COMMENT ON LARGE_P OBJECT_P NumConst IS comment_text
|
| COMMENT ON LARGE_P OBJECT_P NumConst IS comment_text
|
||||||
{ $$ = cat_str(4, make_str("comment on large object"), $5, make_str("is"), $7); }
|
{ $$ = cat_str(4, make_str("comment on large object"), $5, make_str("is"), $7); }
|
||||||
| COMMENT ON CAST '(' Typename AS Typename ')' IS comment_text
|
| COMMENT ON CAST '(' Typename AS Typename ')' IS comment_text
|
||||||
@ -2366,12 +2437,12 @@ index_params: index_elem { $$ = $1; }
|
|||||||
| index_params ',' index_elem { $$ = cat_str(3, $1, make_str(","), $3); }
|
| index_params ',' index_elem { $$ = cat_str(3, $1, make_str(","), $3); }
|
||||||
;
|
;
|
||||||
|
|
||||||
index_elem: ColId opt_class
|
index_elem: ColId opt_class opt_asc_desc opt_nulls_order
|
||||||
{ $$ = cat2_str($1, $2); }
|
{ $$ = cat_str(4, $1, $2, $3, $4); }
|
||||||
| func_expr opt_class
|
| func_expr opt_class opt_asc_desc opt_nulls_order
|
||||||
{ $$ = cat2_str($1, $2); }
|
{ $$ = cat_str(4, $1, $2, $3, $4); }
|
||||||
| '(' a_expr ')' opt_class
|
| '(' a_expr ')' opt_class opt_asc_desc opt_nulls_order
|
||||||
{ $$ = cat_str(4, make_str("("), $2, make_str(")"), $4); }
|
{ $$ = cat_str(6, make_str("("), $2, make_str(")"), $4, $5, $6); }
|
||||||
;
|
;
|
||||||
|
|
||||||
opt_class: any_name { $$ = $1; }
|
opt_class: any_name { $$ = $1; }
|
||||||
@ -2379,6 +2450,16 @@ opt_class: any_name { $$ = $1; }
|
|||||||
| /*EMPTY*/ { $$ = EMPTY; }
|
| /*EMPTY*/ { $$ = EMPTY; }
|
||||||
;
|
;
|
||||||
|
|
||||||
|
opt_asc_desc: ASC { $$ = make_str("asc"); }
|
||||||
|
| DESC { $$ = make_str("desc"); }
|
||||||
|
| /*EMPTY*/ { $$ = EMPTY; }
|
||||||
|
;
|
||||||
|
|
||||||
|
opt_nulls_order: NULLS_FIRST { $$ = make_str("nulls first"); }
|
||||||
|
| NULLS_LAST { $$ = make_str("nulls last"); }
|
||||||
|
| /*EMPTY*/ { $$ = EMPTY; }
|
||||||
|
;
|
||||||
|
|
||||||
CreateFunctionStmt: CREATE opt_or_replace FUNCTION func_name func_args
|
CreateFunctionStmt: CREATE opt_or_replace FUNCTION func_name func_args
|
||||||
RETURNS func_return createfunc_opt_list opt_definition
|
RETURNS func_return createfunc_opt_list opt_definition
|
||||||
{ $$ = cat_str(8, make_str("create"), $2, make_str("function"), $4, $5, make_str("returns"), $7, $8); }
|
{ $$ = cat_str(8, make_str("create"), $2, make_str("function"), $4, $5, make_str("returns"), $7, $8); }
|
||||||
@ -2422,7 +2503,7 @@ func_as: StringConst
|
|||||||
{ $$ = cat_str(3, $1, make_str(","), $3); }
|
{ $$ = cat_str(3, $1, make_str(","), $3); }
|
||||||
;
|
;
|
||||||
|
|
||||||
param_name: function_name { $$ = $1; };
|
param_name: type_function_name { $$ = $1; };
|
||||||
|
|
||||||
func_return: func_type
|
func_return: func_type
|
||||||
{
|
{
|
||||||
@ -2432,14 +2513,14 @@ func_return: func_type
|
|||||||
*/
|
*/
|
||||||
$$ = $1;
|
$$ = $1;
|
||||||
}
|
}
|
||||||
| SETOF type_name attrs '%' TYPE_P
|
|
||||||
{ $$ = cat_str(4, make_str("setof"), $2, $3, make_str("% type")); }
|
|
||||||
;
|
;
|
||||||
|
|
||||||
func_type: Typename
|
func_type: Typename
|
||||||
{ $$ = $1; }
|
{ $$ = $1; }
|
||||||
| type_name attrs '%' TYPE_P
|
| type_function_name attrs '%' TYPE_P
|
||||||
{ $$ = cat_str(3, $1, $2, make_str("% type")); }
|
{ $$ = cat_str(3, $1, $2, make_str("% type")); }
|
||||||
|
| SETOF type_function_name attrs '%' TYPE_P
|
||||||
|
{ $$ = cat_str(4, make_str("setof"), $2, $3, make_str("% type")); }
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
@ -2470,6 +2551,10 @@ common_func_opt_item:
|
|||||||
{ $$ = make_str("security definer"); }
|
{ $$ = make_str("security definer"); }
|
||||||
| SECURITY INVOKER
|
| SECURITY INVOKER
|
||||||
{ $$ = make_str("security invoker"); }
|
{ $$ = make_str("security invoker"); }
|
||||||
|
| COST NumConst
|
||||||
|
{ $$ = cat2_str(make_str("cost"), $2); }
|
||||||
|
| ROWS NumConst
|
||||||
|
{ $$ = cat2_str(make_str("rows"), $2); }
|
||||||
;
|
;
|
||||||
createfunc_opt_item: AS func_as
|
createfunc_opt_item: AS func_as
|
||||||
{ $$ = cat2_str(make_str("as"), $2); }
|
{ $$ = cat2_str(make_str("as"), $2); }
|
||||||
@ -2607,6 +2692,8 @@ RenameStmt: ALTER AGGREGATE func_name aggr_args RENAME TO name
|
|||||||
{ $$ = cat_str(4, make_str("alter language"), $3, make_str("rename to"), $6); }
|
{ $$ = cat_str(4, make_str("alter language"), $3, make_str("rename to"), $6); }
|
||||||
| ALTER OPERATOR CLASS any_name USING access_method RENAME TO name
|
| ALTER OPERATOR CLASS any_name USING access_method RENAME TO name
|
||||||
{ $$ = cat_str(6, make_str("alter operator class"), $4, make_str("using"), $6, make_str("rename to"), $9); }
|
{ $$ = cat_str(6, make_str("alter operator class"), $4, make_str("using"), $6, make_str("rename to"), $9); }
|
||||||
|
| ALTER OPERATOR FAMILY any_name USING access_method RENAME TO name
|
||||||
|
{ $$ = cat_str(6, make_str("alter operator family"), $4, make_str("using"), $6, make_str("rename to"), $9); }
|
||||||
| ALTER SCHEMA name RENAME TO name
|
| ALTER SCHEMA name RENAME TO name
|
||||||
{ $$ = cat_str(4, make_str("alter schema"), $3, make_str("rename to"), $6); }
|
{ $$ = cat_str(4, make_str("alter schema"), $3, make_str("rename to"), $6); }
|
||||||
| ALTER TABLE relation_expr RENAME TO name
|
| ALTER TABLE relation_expr RENAME TO name
|
||||||
@ -2668,6 +2755,8 @@ AlterOwnerStmt: ALTER AGGREGATE func_name aggr_args OWNER TO RoleId
|
|||||||
{ $$ = cat_str(6, make_str("alter operator"), $3, make_str("("), $5, make_str(") owner to"), $9); }
|
{ $$ = cat_str(6, make_str("alter operator"), $3, make_str("("), $5, make_str(") owner to"), $9); }
|
||||||
| ALTER OPERATOR CLASS any_name USING access_method OWNER TO RoleId
|
| ALTER OPERATOR CLASS any_name USING access_method OWNER TO RoleId
|
||||||
{ $$ = cat_str(6, make_str("alter operator class"), $4, make_str("using"), $6, make_str("owner to"), $9); }
|
{ $$ = cat_str(6, make_str("alter operator class"), $4, make_str("using"), $6, make_str("owner to"), $9); }
|
||||||
|
| ALTER OPERATOR FAMILY any_name USING access_method OWNER TO RoleId
|
||||||
|
{ $$ = cat_str(6, make_str("alter operator family"), $4, make_str("using"), $6, make_str("owner to"), $9); }
|
||||||
| ALTER SCHEMA name OWNER TO RoleId
|
| ALTER SCHEMA name OWNER TO RoleId
|
||||||
{ $$ = cat_str(4, make_str("alter schema"), $3, make_str("owner to"), $6); }
|
{ $$ = cat_str(4, make_str("alter schema"), $3, make_str("owner to"), $6); }
|
||||||
| ALTER TYPE_P any_name OWNER TO RoleId
|
| ALTER TYPE_P any_name OWNER TO RoleId
|
||||||
@ -2824,11 +2913,20 @@ ViewStmt: CREATE OptTemp VIEW qualified_name opt_column_list AS SelectStmt opt_
|
|||||||
*/
|
*/
|
||||||
opt_check_option:
|
opt_check_option:
|
||||||
WITH_CHECK OPTION
|
WITH_CHECK OPTION
|
||||||
{ mmerror(PARSE_ERROR, ET_ERROR, "WITH CHECK OPTION not implemented"); }
|
{
|
||||||
|
mmerror(PARSE_ERROR, ET_ERROR, "WITH CHECK OPTION not implemented");
|
||||||
|
$$ = EMPTY;
|
||||||
|
}
|
||||||
| WITH_CASCADED CHECK OPTION
|
| WITH_CASCADED CHECK OPTION
|
||||||
{ mmerror(PARSE_ERROR, ET_ERROR, "WITH CHECK OPTION not implemented"); }
|
{
|
||||||
|
mmerror(PARSE_ERROR, ET_ERROR, "WITH CHECK OPTION not implemented");
|
||||||
|
$$ = EMPTY;
|
||||||
|
}
|
||||||
| WITH_LOCAL CHECK OPTION
|
| WITH_LOCAL CHECK OPTION
|
||||||
{ mmerror(PARSE_ERROR, ET_ERROR, "WITH CHECK OPTION not implemented"); }
|
{
|
||||||
|
mmerror(PARSE_ERROR, ET_ERROR, "WITH CHECK OPTION not implemented");
|
||||||
|
$$ = EMPTY;
|
||||||
|
}
|
||||||
| /* EMPTY */
|
| /* EMPTY */
|
||||||
{ $$ = EMPTY; }
|
{ $$ = EMPTY; }
|
||||||
;
|
;
|
||||||
@ -3070,18 +3168,13 @@ PreparableStmt:
|
|||||||
| DeleteStmt
|
| DeleteStmt
|
||||||
;
|
;
|
||||||
|
|
||||||
prep_type_clause: '(' prep_type_list ')' { $$ = cat_str(3, make_str("("), $2, make_str(")")); }
|
prep_type_clause: '(' type_list ')' { $$ = cat_str(3, make_str("("), $2, make_str(")")); }
|
||||||
| /* EMPTY * / { $$ = EMPTY; }
|
| /* EMPTY * / { $$ = EMPTY; }
|
||||||
;
|
;
|
||||||
|
|
||||||
prep_type_list: Typename { $$ = $1; }
|
|
||||||
| prep_type_list ',' Typename { $$ = cat_str(3, $1, make_str(","), $3); }
|
|
||||||
;
|
|
||||||
|
|
||||||
ExecuteStmt: EXECUTE name execute_param_clause
|
ExecuteStmt: EXECUTE name execute_param_clause
|
||||||
{ $$ = cat_str(3, make_str("execute"), $2, $3); }
|
{ $$ = cat_str(3, make_str("execute"), $2, $3); }
|
||||||
| CREATE OptTemp TABLE qualified_name OptCreateAs
|
| CREATE OptTemp TABLE create_as_target AS
|
||||||
OptWith OnCommitOption OptTableSpace AS
|
|
||||||
EXECUTE name execute_param_clause
|
EXECUTE name execute_param_clause
|
||||||
{ $$ = cat_str(11, make_str("create"), $2, make_str("table"), $4, $5, $6, $7, $8, make_str("as execute"), $11, $12); }
|
{ $$ = cat_str(11, make_str("create"), $2, make_str("table"), $4, $5, $6, $7, $8, make_str("as execute"), $11, $12); }
|
||||||
;
|
;
|
||||||
@ -3373,14 +3466,10 @@ sortby_list: sortby { $$ = $1; }
|
|||||||
| sortby_list ',' sortby { $$ = cat_str(3, $1, make_str(","), $3); }
|
| sortby_list ',' sortby { $$ = cat_str(3, $1, make_str(","), $3); }
|
||||||
;
|
;
|
||||||
|
|
||||||
sortby: a_expr USING qual_all_Op
|
sortby: a_expr USING qual_all_Op opt_nulls_order
|
||||||
{ $$ = cat_str(3, $1, make_str("using"), $3); }
|
{ $$ = cat_str(4, $1, make_str("using"), $3, $4); }
|
||||||
| a_expr ASC
|
| a_expr opt_asc_desc opt_nulls_order
|
||||||
{ $$ = cat2_str($1, make_str("asc")); }
|
{ $$ = cat_str(3, $1, $2, $3); }
|
||||||
| a_expr DESC
|
|
||||||
{ $$ = cat2_str($1, make_str("desc")); }
|
|
||||||
| a_expr
|
|
||||||
{ $$ = $1; }
|
|
||||||
;
|
;
|
||||||
|
|
||||||
select_limit: LIMIT select_limit_value OFFSET select_offset_value
|
select_limit: LIMIT select_limit_value OFFSET select_offset_value
|
||||||
@ -3665,18 +3754,20 @@ SimpleTypename: GenericType { $$ = $1; }
|
|||||||
{ $$ = cat2_str($1, $2); }
|
{ $$ = cat2_str($1, $2); }
|
||||||
| ConstInterval '(' PosIntConst ')' opt_interval
|
| ConstInterval '(' PosIntConst ')' opt_interval
|
||||||
{ $$ = cat_str(5, $1, make_str("("), $3, make_str(")"), $5); }
|
{ $$ = cat_str(5, $1, make_str("("), $3, make_str(")"), $5); }
|
||||||
| type_name attrs
|
|
||||||
{ $$ = cat2_str($1, $2);}
|
|
||||||
;
|
;
|
||||||
|
|
||||||
ConstTypename: GenericType { $$ = $1; }
|
ConstTypename: Numeric { $$ = $1; }
|
||||||
| ConstDatetime { $$ = $1; }
|
|
||||||
| Numeric { $$ = $1; }
|
|
||||||
| ConstBit { $$ = $1; }
|
| ConstBit { $$ = $1; }
|
||||||
| ConstCharacter { $$ = $1; }
|
| ConstCharacter { $$ = $1; }
|
||||||
|
| ConstDatetime { $$ = $1; }
|
||||||
;
|
;
|
||||||
|
|
||||||
GenericType: type_name { $$ = $1; }
|
GenericType: type_function_name opt_type_modifiers { $$ = cat2_str($1, $2); }
|
||||||
|
| type_function_name attrs opt_type_modifiers { $$ = cat_str(3, $1, $2, $3); }
|
||||||
|
;
|
||||||
|
|
||||||
|
opt_type_modifiers: '(' expr_list ')' { $$ = cat_str(3, make_str("("), $2, make_str(")")); }
|
||||||
|
| /* EMPTY */ { $$ = EMPTY; }
|
||||||
;
|
;
|
||||||
|
|
||||||
/* SQL92 numeric data types
|
/* SQL92 numeric data types
|
||||||
@ -3698,11 +3789,11 @@ Numeric: INT_P
|
|||||||
{ $$ = cat2_str(make_str("float"), $2); }
|
{ $$ = cat2_str(make_str("float"), $2); }
|
||||||
| DOUBLE_P PRECISION
|
| DOUBLE_P PRECISION
|
||||||
{ $$ = make_str("double precision"); }
|
{ $$ = make_str("double precision"); }
|
||||||
| DECIMAL_P opt_decimal
|
| DECIMAL_P opt_type_modifiers
|
||||||
{ $$ = cat2_str(make_str("decimal"), $2); }
|
{ $$ = cat2_str(make_str("decimal"), $2); }
|
||||||
| DEC opt_decimal
|
| DEC opt_type_modifiers
|
||||||
{ $$ = cat2_str(make_str("dec"), $2); }
|
{ $$ = cat2_str(make_str("dec"), $2); }
|
||||||
| NUMERIC opt_numeric
|
| NUMERIC opt_type_modifiers
|
||||||
{ $$ = cat2_str(make_str("numeric"), $2); }
|
{ $$ = cat2_str(make_str("numeric"), $2); }
|
||||||
| BOOLEAN_P
|
| BOOLEAN_P
|
||||||
{ $$ = make_str("boolean"); }
|
{ $$ = make_str("boolean"); }
|
||||||
@ -3714,22 +3805,6 @@ opt_float: '(' PosIntConst ')'
|
|||||||
{ $$ = EMPTY; }
|
{ $$ = EMPTY; }
|
||||||
;
|
;
|
||||||
|
|
||||||
opt_numeric: '(' PosIntConst ',' PosIntConst ')'
|
|
||||||
{ $$ = cat_str(5, make_str("("), $2, make_str(","), $4, make_str(")")); }
|
|
||||||
| '(' PosIntConst ')'
|
|
||||||
{ $$ = cat_str(3, make_str("("), $2, make_str(")")); }
|
|
||||||
| /*EMPTY*/
|
|
||||||
{ $$ = EMPTY; }
|
|
||||||
;
|
|
||||||
|
|
||||||
opt_decimal: '(' PosIntConst ',' PosIntConst ')'
|
|
||||||
{ $$ = cat_str(5, make_str("("), $2, make_str(","), $4, make_str(")")); }
|
|
||||||
| '(' PosIntConst ')'
|
|
||||||
{ $$ = cat_str(3, make_str("("), $2, make_str(")")); }
|
|
||||||
| /*EMPTY*/
|
|
||||||
{ $$ = EMPTY; }
|
|
||||||
;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SQL92 bit-field data types
|
* SQL92 bit-field data types
|
||||||
* The following implements BIT() and BIT VARYING().
|
* The following implements BIT() and BIT VARYING().
|
||||||
@ -3743,7 +3818,7 @@ ConstBit: BitWithLength { $$ = $1; }
|
|||||||
| BitWithoutLength { $$ = $1; }
|
| BitWithoutLength { $$ = $1; }
|
||||||
;
|
;
|
||||||
|
|
||||||
BitWithLength: BIT opt_varying '(' PosIntConst ')'
|
BitWithLength: BIT opt_varying '(' expr_list ')'
|
||||||
{ $$ = cat_str(5, make_str("bit"), $2, make_str("("), $4, make_str(")")); }
|
{ $$ = cat_str(5, make_str("bit"), $2, make_str("("), $4, make_str(")")); }
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -3989,6 +4064,10 @@ a_expr: c_expr
|
|||||||
{ $$ = cat_str(6, $1, $2, $3, make_str("("), $5, make_str(")")); }
|
{ $$ = cat_str(6, $1, $2, $3, make_str("("), $5, make_str(")")); }
|
||||||
| UNIQUE select_with_parens
|
| UNIQUE select_with_parens
|
||||||
{ $$ = cat2_str(make_str("unique"), $2); }
|
{ $$ = cat2_str(make_str("unique"), $2); }
|
||||||
|
| a_expr IS DOCUMENT_P
|
||||||
|
{ $$ = cat2_str($1, make_str("is document")); }
|
||||||
|
| a_expr IS NOT DOCUMENT_P
|
||||||
|
{ $$ = cat2_str($1, make_str("is not document")); }
|
||||||
;
|
;
|
||||||
|
|
||||||
/* Restricted expressions
|
/* Restricted expressions
|
||||||
@ -4037,6 +4116,10 @@ b_expr: c_expr
|
|||||||
{ $$ = cat_str(4, $1, make_str("is of ("), $5, make_str(")")); }
|
{ $$ = cat_str(4, $1, make_str("is of ("), $5, make_str(")")); }
|
||||||
| b_expr IS NOT OF '(' b_expr ')' %prec IS
|
| b_expr IS NOT OF '(' b_expr ')' %prec IS
|
||||||
{ $$ = cat_str(4, $1, make_str("is not of ("), $6, make_str(")")); }
|
{ $$ = cat_str(4, $1, make_str("is not of ("), $6, make_str(")")); }
|
||||||
|
| b_expr IS DOCUMENT_P
|
||||||
|
{ $$ = cat2_str($1, make_str("is document")); }
|
||||||
|
| b_expr IS NOT DOCUMENT_P
|
||||||
|
{ $$ = cat2_str($1, make_str("is not document")); }
|
||||||
;
|
;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -4148,8 +4231,72 @@ func_expr: func_name '(' ')'
|
|||||||
{ $$ = cat_str(3, make_str("greatest("), $3, make_str(")")); }
|
{ $$ = cat_str(3, make_str("greatest("), $3, make_str(")")); }
|
||||||
| LEAST '(' expr_list ')'
|
| LEAST '(' expr_list ')'
|
||||||
{ $$ = cat_str(3, make_str("least("), $3, make_str(")")); }
|
{ $$ = cat_str(3, make_str("least("), $3, make_str(")")); }
|
||||||
|
| XMLCONCAT '(' expr_list ')'
|
||||||
|
{ $$ = cat_str(3, make_str("xmlconcat("), $3, make_str(")")); }
|
||||||
|
| XMLELEMENT '(' NAME_P ColLabel ')'
|
||||||
|
{ $$ = cat_str(3, make_str("xmlelement( name"), $4, make_str(")")); }
|
||||||
|
| XMLELEMENT '(' NAME_P ColLabel ',' xml_attributes ')'
|
||||||
|
{ $$ = cat_str(5, make_str("xmlelement( name"), $4, make_str(","), $6, make_str(")")); }
|
||||||
|
| XMLELEMENT '(' NAME_P ColLabel ',' expr_list ')'
|
||||||
|
{ $$ = cat_str(5, make_str("xmlelement( name"), $4, make_str(","), $6, make_str(")")); }
|
||||||
|
| XMLELEMENT '(' NAME_P ColLabel ',' xml_attributes ',' expr_list ')'
|
||||||
|
{ $$ = cat_str(7, make_str("xmlelement( name"), $4, make_str(","), $6, make_str(","), $8, make_str(")")); }
|
||||||
|
| XMLFOREST '(' xml_attribute_list ')'
|
||||||
|
{ $$ = cat_str(3, make_str("xmlforest("), $3, make_str(")")); }
|
||||||
|
| XMLPARSE '(' document_or_content a_expr xml_whitespace_option ')'
|
||||||
|
{ $$ = cat_str(5, make_str("xmlparse("), $3, $4, $5, make_str(")")); }
|
||||||
|
| XMLPI '(' NAME_P ColLabel ')'
|
||||||
|
{ $$ = cat_str(3, make_str("xmlpi( name"), $4, make_str(")")); }
|
||||||
|
| XMLPI '(' NAME_P ColLabel ',' a_expr ')'
|
||||||
|
{ $$ = cat_str(5, make_str("xmlpi( name"), $4, make_str(","), $6, make_str(")")); }
|
||||||
|
| XMLROOT '(' a_expr ',' xml_root_version opt_xml_root_standalone ')'
|
||||||
|
{ $$ = cat_str(6, make_str("xmlroot("), $3, make_str(","), $5, $6, make_str(")")); }
|
||||||
;
|
;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SQL/XML support
|
||||||
|
*/
|
||||||
|
|
||||||
|
xml_root_version: VERSION_P a_expr
|
||||||
|
{ $$ = cat2_str(make_str("version"), $2); }
|
||||||
|
| VERSION_P NO VALUE_P
|
||||||
|
{ $$ = make_str("version no value"); }
|
||||||
|
;
|
||||||
|
|
||||||
|
opt_xml_root_standalone: ',' STANDALONE_P YES_P
|
||||||
|
{ $$ = make_str(", standalone yes"); }
|
||||||
|
| ',' STANDALONE_P NO
|
||||||
|
{ $$ = make_str(", standalone no"); }
|
||||||
|
| ',' STANDALONE_P NO VALUE_P
|
||||||
|
{ $$ = make_str(", standalone no value"); }
|
||||||
|
| /*EMPTY*/
|
||||||
|
{ $$ = EMPTY; }
|
||||||
|
;
|
||||||
|
|
||||||
|
xml_attributes: XMLATTRIBUTES '(' xml_attribute_list ')'
|
||||||
|
{ $$ = cat_str(3, make_str("xmlattributes("), $3, make_str(")")); }
|
||||||
|
;
|
||||||
|
|
||||||
|
xml_attribute_list: xml_attribute_el
|
||||||
|
{ $$ = $1; }
|
||||||
|
| xml_attribute_list ',' xml_attribute_el
|
||||||
|
{ $$ = cat_str(3, $1, make_str(","), $3); }
|
||||||
|
;
|
||||||
|
|
||||||
|
xml_attribute_el: a_expr AS ColLabel
|
||||||
|
{ $$ = cat_str(3, $1, make_str("as"), $3); }
|
||||||
|
| a_expr
|
||||||
|
{ $$ = $1; }
|
||||||
|
;
|
||||||
|
|
||||||
|
document_or_content: DOCUMENT_P { $$ = make_str("document"); }
|
||||||
|
| CONTENT_P { $$ = make_str("content"); }
|
||||||
|
;
|
||||||
|
|
||||||
|
xml_whitespace_option: PRESERVE WHITESPACE_P { $$ = make_str("preserve whitespace"); }
|
||||||
|
| STRIP_P WHITESPACE_P { $$ = make_str("strip whitespace"); }
|
||||||
|
| /*EMPTY*/ { $$ = EMPTY; }
|
||||||
|
;
|
||||||
|
|
||||||
row: ROW '(' expr_list ')'
|
row: ROW '(' expr_list ')'
|
||||||
{ $$ = cat_str(3, make_str("row ("), $3, make_str(")")); }
|
{ $$ = cat_str(3, make_str("row ("), $3, make_str(")")); }
|
||||||
@ -4207,10 +4354,10 @@ extract_list: extract_arg FROM a_expr
|
|||||||
{ $$ = EMPTY; }
|
{ $$ = EMPTY; }
|
||||||
;
|
;
|
||||||
|
|
||||||
type_list: type_list ',' Typename
|
type_list: Typename
|
||||||
{ $$ = cat_str(3, $1, ',', $3); }
|
|
||||||
| Typename
|
|
||||||
{ $$ = $1; }
|
{ $$ = $1; }
|
||||||
|
| type_list ',' Typename
|
||||||
|
{ $$ = cat_str(3, $1, ',', $3); }
|
||||||
;
|
;
|
||||||
|
|
||||||
array_expr_list: array_expr { $$ = $1; }
|
array_expr_list: array_expr { $$ = $1; }
|
||||||
@ -4476,7 +4623,7 @@ index_name: ColId { $$ = $1; };
|
|||||||
|
|
||||||
file_name: StringConst { $$ = $1; };
|
file_name: StringConst { $$ = $1; };
|
||||||
|
|
||||||
func_name: function_name
|
func_name: type_function_name
|
||||||
{ $$ = $1; }
|
{ $$ = $1; }
|
||||||
| relation_name indirection
|
| relation_name indirection
|
||||||
{ $$ = cat2_str($1, $2); }
|
{ $$ = cat2_str($1, $2); }
|
||||||
@ -4602,12 +4749,15 @@ AllConst: Sconst { $$ = $1; }
|
|||||||
| NumConst { $$ = $1; }
|
| NumConst { $$ = $1; }
|
||||||
;
|
;
|
||||||
|
|
||||||
PosAllConst: Sconst { $$ = $1; }
|
PosAllConst: Sconst { $$ = $1; }
|
||||||
| Fconst { $$ = $1; }
|
| Fconst { $$ = $1; }
|
||||||
| Iconst { $$ = $1; }
|
| Iconst { $$ = $1; }
|
||||||
| Bconst { $$ = $1; }
|
| Bconst { $$ = $1; }
|
||||||
| Xconst { $$ = $1; }
|
| Xconst { $$ = $1; }
|
||||||
| civar { $$ = $1; }
|
| func_name Sconst { $$ = cat2_str($1, $2); }
|
||||||
|
| func_name '(' expr_list ')' Sconst
|
||||||
|
{ $$ = cat_str(5, $1, make_str("("), $3, make_str(")"), $5); }
|
||||||
|
| civar { $$ = $1; }
|
||||||
;
|
;
|
||||||
|
|
||||||
RoleId: ColId { $$ = $1;};
|
RoleId: ColId { $$ = $1;};
|
||||||
@ -4638,12 +4788,12 @@ SpecialRuleRelation: OLD
|
|||||||
ECPGConnect: SQL_CONNECT TO connection_target opt_connection_name opt_user
|
ECPGConnect: SQL_CONNECT TO connection_target opt_connection_name opt_user
|
||||||
{ $$ = cat_str(5, $3, make_str(","), $5, make_str(","), $4); }
|
{ $$ = cat_str(5, $3, make_str(","), $5, make_str(","), $4); }
|
||||||
| SQL_CONNECT TO DEFAULT
|
| SQL_CONNECT TO DEFAULT
|
||||||
{ $$ = make_str("NULL,NULL,NULL,\"DEFAULT\""); }
|
{ $$ = make_str("NULL, NULL, NULL, \"DEFAULT\""); }
|
||||||
/* also allow ORACLE syntax */
|
/* also allow ORACLE syntax */
|
||||||
| SQL_CONNECT ora_user
|
| SQL_CONNECT ora_user
|
||||||
{ $$ = cat_str(3, make_str("NULL,"), $2, make_str(",NULL")); }
|
{ $$ = cat_str(3, make_str("NULL,"), $2, make_str(", NULL")); }
|
||||||
| DATABASE connection_target
|
| DATABASE connection_target
|
||||||
{ $$ = cat2_str($2, make_str(",NULL,NULL,NULL")); }
|
{ $$ = cat2_str($2, make_str(", NULL, NULL, NULL")); }
|
||||||
;
|
;
|
||||||
|
|
||||||
connection_target: opt_database_name opt_server opt_port
|
connection_target: opt_database_name opt_server opt_port
|
||||||
@ -4732,7 +4882,7 @@ opt_connection_name: AS connection_object { $$ = $2; }
|
|||||||
;
|
;
|
||||||
|
|
||||||
opt_user: USER ora_user { $$ = $2; }
|
opt_user: USER ora_user { $$ = $2; }
|
||||||
| /*EMPTY*/ { $$ = make_str("NULL,NULL"); }
|
| /*EMPTY*/ { $$ = make_str("NULL, NULL"); }
|
||||||
;
|
;
|
||||||
|
|
||||||
ora_user: user_name
|
ora_user: user_name
|
||||||
@ -5744,7 +5894,7 @@ desc_header_item: SQL_COUNT { $$ = ECPGd_count; }
|
|||||||
* manipulate a descriptor
|
* manipulate a descriptor
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ECPGGetDescriptor: GET SQL_DESCRIPTOR quoted_ident_stringvar SQL_VALUE IntConstVar ECPGGetDescItems
|
ECPGGetDescriptor: GET SQL_DESCRIPTOR quoted_ident_stringvar VALUE_P IntConstVar ECPGGetDescItems
|
||||||
{ $$.str = $5; $$.name = $3; }
|
{ $$.str = $5; $$.name = $3; }
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -5755,7 +5905,7 @@ ECPGGetDescItems: ECPGGetDescItem
|
|||||||
ECPGGetDescItem: cvariable '=' descriptor_item { push_assignment($1, $3); };
|
ECPGGetDescItem: cvariable '=' descriptor_item { push_assignment($1, $3); };
|
||||||
|
|
||||||
|
|
||||||
ECPGSetDescriptor: SET SQL_DESCRIPTOR quoted_ident_stringvar SQL_VALUE IntConstVar ECPGSetDescItems
|
ECPGSetDescriptor: SET SQL_DESCRIPTOR quoted_ident_stringvar VALUE_P IntConstVar ECPGSetDescItems
|
||||||
{ $$.str = $5; $$.name = $3; }
|
{ $$.str = $5; $$.name = $3; }
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -5771,20 +5921,20 @@ ECPGSetDescItem: descriptor_item '=' AllConstVar
|
|||||||
|
|
||||||
|
|
||||||
descriptor_item: SQL_CARDINALITY { $$ = ECPGd_cardinality; }
|
descriptor_item: SQL_CARDINALITY { $$ = ECPGd_cardinality; }
|
||||||
| SQL_DATA { $$ = ECPGd_data; }
|
| SQL_DATA { $$ = ECPGd_data; }
|
||||||
| SQL_DATETIME_INTERVAL_CODE { $$ = ECPGd_di_code; }
|
| SQL_DATETIME_INTERVAL_CODE { $$ = ECPGd_di_code; }
|
||||||
| SQL_DATETIME_INTERVAL_PRECISION { $$ = ECPGd_di_precision; }
|
| SQL_DATETIME_INTERVAL_PRECISION { $$ = ECPGd_di_precision; }
|
||||||
| SQL_INDICATOR { $$ = ECPGd_indicator; }
|
| SQL_INDICATOR { $$ = ECPGd_indicator; }
|
||||||
| SQL_KEY_MEMBER { $$ = ECPGd_key_member; }
|
| SQL_KEY_MEMBER { $$ = ECPGd_key_member; }
|
||||||
| SQL_LENGTH { $$ = ECPGd_length; }
|
| SQL_LENGTH { $$ = ECPGd_length; }
|
||||||
| SQL_NAME { $$ = ECPGd_name; }
|
| NAME_P { $$ = ECPGd_name; }
|
||||||
| SQL_NULLABLE { $$ = ECPGd_nullable; }
|
| SQL_NULLABLE { $$ = ECPGd_nullable; }
|
||||||
| SQL_OCTET_LENGTH { $$ = ECPGd_octet; }
|
| SQL_OCTET_LENGTH { $$ = ECPGd_octet; }
|
||||||
| PRECISION { $$ = ECPGd_precision; }
|
| PRECISION { $$ = ECPGd_precision; }
|
||||||
| SQL_RETURNED_LENGTH { $$ = ECPGd_length; }
|
| SQL_RETURNED_LENGTH { $$ = ECPGd_length; }
|
||||||
| SQL_RETURNED_OCTET_LENGTH { $$ = ECPGd_ret_octet; }
|
| SQL_RETURNED_OCTET_LENGTH { $$ = ECPGd_ret_octet; }
|
||||||
| SQL_SCALE { $$ = ECPGd_scale; }
|
| SQL_SCALE { $$ = ECPGd_scale; }
|
||||||
| TYPE_P { $$ = ECPGd_type; }
|
| TYPE_P { $$ = ECPGd_type; }
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
@ -6067,7 +6217,6 @@ ECPGKeywords_vanames: SQL_BREAK { $$ = make_str("break"); }
|
|||||||
| SQL_INDICATOR { $$ = make_str("indicator"); }
|
| SQL_INDICATOR { $$ = make_str("indicator"); }
|
||||||
| SQL_KEY_MEMBER { $$ = make_str("key_member"); }
|
| SQL_KEY_MEMBER { $$ = make_str("key_member"); }
|
||||||
| SQL_LENGTH { $$ = make_str("length"); }
|
| SQL_LENGTH { $$ = make_str("length"); }
|
||||||
| SQL_NAME { $$ = make_str("name"); }
|
|
||||||
| SQL_NULLABLE { $$ = make_str("nullable"); }
|
| SQL_NULLABLE { $$ = make_str("nullable"); }
|
||||||
| SQL_OCTET_LENGTH { $$ = make_str("octet_length"); }
|
| SQL_OCTET_LENGTH { $$ = make_str("octet_length"); }
|
||||||
| SQL_RETURNED_LENGTH { $$ = make_str("returned_length"); }
|
| SQL_RETURNED_LENGTH { $$ = make_str("returned_length"); }
|
||||||
@ -6078,7 +6227,6 @@ ECPGKeywords_vanames: SQL_BREAK { $$ = make_str("break"); }
|
|||||||
| SQL_SQLPRINT { $$ = make_str("sqlprint"); }
|
| SQL_SQLPRINT { $$ = make_str("sqlprint"); }
|
||||||
| SQL_SQLWARNING { $$ = make_str("sqlwarning"); }
|
| SQL_SQLWARNING { $$ = make_str("sqlwarning"); }
|
||||||
| SQL_STOP { $$ = make_str("stop"); }
|
| SQL_STOP { $$ = make_str("stop"); }
|
||||||
| SQL_VALUE { $$ = make_str("value"); }
|
|
||||||
;
|
;
|
||||||
|
|
||||||
ECPGKeywords_rest: SQL_CONNECT { $$ = make_str("connect"); }
|
ECPGKeywords_rest: SQL_CONNECT { $$ = make_str("connect"); }
|
||||||
@ -6132,41 +6280,33 @@ ColId: ident { $$ = $1; }
|
|||||||
| CHAR_P { $$ = make_str("char"); }
|
| CHAR_P { $$ = make_str("char"); }
|
||||||
| VALUES { $$ = make_str("values"); }
|
| VALUES { $$ = make_str("values"); }
|
||||||
;
|
;
|
||||||
/* Type identifier --- names that can be type names.
|
/* Type/function identifier --- names that can be type names.
|
||||||
*/
|
*/
|
||||||
type_name: ident { $$ = $1; }
|
type_function_name: ident { $$ = $1; }
|
||||||
| unreserved_keyword { $$ = $1; }
|
| unreserved_keyword { $$ = $1; }
|
||||||
|
| type_func_name_keyword { $$ = $1; }
|
||||||
| ECPGKeywords { $$ = $1; }
|
| ECPGKeywords { $$ = $1; }
|
||||||
| ECPGTypeName { $$ = $1; }
|
| ECPGTypeName { $$ = $1; }
|
||||||
| ECPGCKeywords { $$ = $1; }
|
| ECPGCKeywords { $$ = $1; }
|
||||||
;
|
;
|
||||||
|
|
||||||
/* Function identifier --- names that can be function names.
|
|
||||||
*/
|
|
||||||
function_name: ident { $$ = $1; }
|
|
||||||
| unreserved_keyword { $$ = $1; }
|
|
||||||
| func_name_keyword { $$ = $1; }
|
|
||||||
| ECPGKeywords { $$ = $1; }
|
|
||||||
| ECPGCKeywords { $$ = $1; }
|
|
||||||
;
|
|
||||||
|
|
||||||
/* Column label --- allowed labels in "AS" clauses.
|
/* Column label --- allowed labels in "AS" clauses.
|
||||||
* This presently includes *all* Postgres keywords.
|
* This presently includes *all* Postgres keywords.
|
||||||
*/
|
*/
|
||||||
ColLabel: ECPGColLabel { $$ = $1; }
|
ColLabel: ECPGColLabel { $$ = $1; }
|
||||||
| ECPGTypeName { $$ = $1; }
|
| ECPGTypeName { $$ = $1; }
|
||||||
| CHAR_P { $$ = make_str("char"); }
|
| CHAR_P { $$ = make_str("char"); }
|
||||||
| INPUT_P { $$ = make_str("input"); }
|
| INPUT_P { $$ = make_str("input"); }
|
||||||
| INT_P { $$ = make_str("int"); }
|
| INT_P { $$ = make_str("int"); }
|
||||||
| UNION { $$ = make_str("union"); }
|
| UNION { $$ = make_str("union"); }
|
||||||
| TO { $$ = make_str("to"); }
|
| TO { $$ = make_str("to"); }
|
||||||
| ECPGCKeywords { $$ = $1; }
|
| ECPGCKeywords { $$ = $1; }
|
||||||
| ECPGunreserved_interval { $$ = $1; }
|
| ECPGunreserved_interval { $$ = $1; }
|
||||||
;
|
;
|
||||||
|
|
||||||
ECPGColLabelCommon: ident { $$ = $1; }
|
ECPGColLabelCommon: ident { $$ = $1; }
|
||||||
| col_name_keyword { $$ = $1; }
|
| col_name_keyword { $$ = $1; }
|
||||||
| func_name_keyword { $$ = $1; }
|
| type_func_name_keyword { $$ = $1; }
|
||||||
| ECPGKeywords_vanames { $$ = $1; }
|
| ECPGKeywords_vanames { $$ = $1; }
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -6249,8 +6389,10 @@ ECPGunreserved_con: ABORT_P { $$ = make_str("abort"); }
|
|||||||
| CONCURRENTLY { $$ = make_str("concurrently"); }
|
| CONCURRENTLY { $$ = make_str("concurrently"); }
|
||||||
/* | CONNECTION { $$ = make_str("connection"); }*/
|
/* | CONNECTION { $$ = make_str("connection"); }*/
|
||||||
| CONSTRAINTS { $$ = make_str("constraints"); }
|
| CONSTRAINTS { $$ = make_str("constraints"); }
|
||||||
|
| CONTENT_P { $$ = make_str("content"); }
|
||||||
| CONVERSION_P { $$ = make_str("conversion"); }
|
| CONVERSION_P { $$ = make_str("conversion"); }
|
||||||
| COPY { $$ = make_str("copy"); }
|
| COPY { $$ = make_str("copy"); }
|
||||||
|
| COST { $$ = make_str("cost"); }
|
||||||
| CREATEDB { $$ = make_str("createdb"); }
|
| CREATEDB { $$ = make_str("createdb"); }
|
||||||
| CREATEROLE { $$ = make_str("createrole"); }
|
| CREATEROLE { $$ = make_str("createrole"); }
|
||||||
| CREATEUSER { $$ = make_str("createuser"); }
|
| CREATEUSER { $$ = make_str("createuser"); }
|
||||||
@ -6267,6 +6409,7 @@ ECPGunreserved_con: ABORT_P { $$ = make_str("abort"); }
|
|||||||
| DELIMITER { $$ = make_str("delimiter"); }
|
| DELIMITER { $$ = make_str("delimiter"); }
|
||||||
| DELIMITERS { $$ = make_str("delimiters"); }
|
| DELIMITERS { $$ = make_str("delimiters"); }
|
||||||
| DISABLE_P { $$ = make_str("disable"); }
|
| DISABLE_P { $$ = make_str("disable"); }
|
||||||
|
| DOCUMENT_P { $$ = make_str("document"); }
|
||||||
| DOMAIN_P { $$ = make_str("domain"); }
|
| DOMAIN_P { $$ = make_str("domain"); }
|
||||||
| DOUBLE_P { $$ = make_str("double"); }
|
| DOUBLE_P { $$ = make_str("double"); }
|
||||||
| DROP { $$ = make_str("drop"); }
|
| DROP { $$ = make_str("drop"); }
|
||||||
@ -6279,6 +6422,8 @@ ECPGunreserved_con: ABORT_P { $$ = make_str("abort"); }
|
|||||||
| EXCLUSIVE { $$ = make_str("exclusive"); }
|
| EXCLUSIVE { $$ = make_str("exclusive"); }
|
||||||
| EXECUTE { $$ = make_str("execute"); }
|
| EXECUTE { $$ = make_str("execute"); }
|
||||||
| EXPLAIN { $$ = make_str("explain"); }
|
| EXPLAIN { $$ = make_str("explain"); }
|
||||||
|
| EXTERNAL { $$ = make_str("external"); }
|
||||||
|
| FAMILY { $$ = make_str("family"); }
|
||||||
| FETCH { $$ = make_str("fetch"); }
|
| FETCH { $$ = make_str("fetch"); }
|
||||||
| FIRST_P { $$ = make_str("first"); }
|
| FIRST_P { $$ = make_str("first"); }
|
||||||
| FORCE { $$ = make_str("force"); }
|
| FORCE { $$ = make_str("force"); }
|
||||||
@ -6323,6 +6468,7 @@ ECPGunreserved_con: ABORT_P { $$ = make_str("abort"); }
|
|||||||
| MODE { $$ = make_str("mode"); }
|
| MODE { $$ = make_str("mode"); }
|
||||||
/* | MONTH_P { $$ = make_str("month"); }*/
|
/* | MONTH_P { $$ = make_str("month"); }*/
|
||||||
| MOVE { $$ = make_str("move"); }
|
| MOVE { $$ = make_str("move"); }
|
||||||
|
| NAME_P { $$ = make_str("name"); }
|
||||||
| NAMES { $$ = make_str("names"); }
|
| NAMES { $$ = make_str("names"); }
|
||||||
| NEXT { $$ = make_str("next"); }
|
| NEXT { $$ = make_str("next"); }
|
||||||
| NO { $$ = make_str("no"); }
|
| NO { $$ = make_str("no"); }
|
||||||
@ -6335,6 +6481,7 @@ ECPGunreserved_con: ABORT_P { $$ = make_str("abort"); }
|
|||||||
| NOTHING { $$ = make_str("nothing"); }
|
| NOTHING { $$ = make_str("nothing"); }
|
||||||
| NOTIFY { $$ = make_str("notify"); }
|
| NOTIFY { $$ = make_str("notify"); }
|
||||||
| NOWAIT { $$ = make_str("nowait"); }
|
| NOWAIT { $$ = make_str("nowait"); }
|
||||||
|
| NULLS_P { $$ = make_str("nulls"); }
|
||||||
| OBJECT_P { $$ = make_str("object"); }
|
| OBJECT_P { $$ = make_str("object"); }
|
||||||
| OF { $$ = make_str("of"); }
|
| OF { $$ = make_str("of"); }
|
||||||
| OIDS { $$ = make_str("oids"); }
|
| OIDS { $$ = make_str("oids"); }
|
||||||
@ -6382,14 +6529,16 @@ ECPGunreserved_con: ABORT_P { $$ = make_str("abort"); }
|
|||||||
| SHOW { $$ = make_str("show"); }
|
| SHOW { $$ = make_str("show"); }
|
||||||
| SIMPLE { $$ = make_str("simple"); }
|
| SIMPLE { $$ = make_str("simple"); }
|
||||||
| STABLE { $$ = make_str("stable"); }
|
| STABLE { $$ = make_str("stable"); }
|
||||||
|
| STANDALONE_P { $$ = make_str("standalone"); }
|
||||||
| START { $$ = make_str("start"); }
|
| START { $$ = make_str("start"); }
|
||||||
| STATEMENT { $$ = make_str("statement"); }
|
| STATEMENT { $$ = make_str("statement"); }
|
||||||
| STATISTICS { $$ = make_str("statistics"); }
|
| STATISTICS { $$ = make_str("statistics"); }
|
||||||
| STDIN { $$ = make_str("stdin"); }
|
| STDIN { $$ = make_str("stdin"); }
|
||||||
| STDOUT { $$ = make_str("stdout"); }
|
| STDOUT { $$ = make_str("stdout"); }
|
||||||
| STORAGE { $$ = make_str("storage"); }
|
| STORAGE { $$ = make_str("storage"); }
|
||||||
| SUPERUSER_P { $$ = make_str("superuser"); }
|
|
||||||
| STRICT_P { $$ = make_str("strict"); }
|
| STRICT_P { $$ = make_str("strict"); }
|
||||||
|
| STRIP_P { $$ = make_str("strip"); }
|
||||||
|
| SUPERUSER_P { $$ = make_str("superuser"); }
|
||||||
| SYSTEM_P { $$ = make_str("system"); }
|
| SYSTEM_P { $$ = make_str("system"); }
|
||||||
| SYSID { $$ = make_str("sysid"); }
|
| SYSID { $$ = make_str("sysid"); }
|
||||||
| TABLESPACE { $$ = make_str("tablespace"); }
|
| TABLESPACE { $$ = make_str("tablespace"); }
|
||||||
@ -6409,12 +6558,19 @@ ECPGunreserved_con: ABORT_P { $$ = make_str("abort"); }
|
|||||||
| UPDATE { $$ = make_str("update"); }
|
| UPDATE { $$ = make_str("update"); }
|
||||||
| VACUUM { $$ = make_str("vacuum"); }
|
| VACUUM { $$ = make_str("vacuum"); }
|
||||||
| VALID { $$ = make_str("valid"); }
|
| VALID { $$ = make_str("valid"); }
|
||||||
|
| VALIDATOR { $$ = make_str("validator"); }
|
||||||
|
| VALUE_P { $$ = make_str("value"); }
|
||||||
| VARYING { $$ = make_str("varying"); }
|
| VARYING { $$ = make_str("varying"); }
|
||||||
|
| VERSION_P { $$ = make_str("version"); }
|
||||||
| VIEW { $$ = make_str("view"); }
|
| VIEW { $$ = make_str("view"); }
|
||||||
|
| VOLATILE { $$ = make_str("volatile"); }
|
||||||
|
| WHITESPACE_P { $$ = make_str("whitespace"); }
|
||||||
| WITH { $$ = make_str("with"); }
|
| WITH { $$ = make_str("with"); }
|
||||||
| WITHOUT { $$ = make_str("without"); }
|
| WITHOUT { $$ = make_str("without"); }
|
||||||
| WORK { $$ = make_str("work"); }
|
| WORK { $$ = make_str("work"); }
|
||||||
| WRITE { $$ = make_str("write"); }
|
| WRITE { $$ = make_str("write"); }
|
||||||
|
| XML_P { $$ = make_str("xml"); }
|
||||||
|
| YES_P { $$ = make_str("yes"); }
|
||||||
/* | YEAR_P { $$ = make_str("year"); }*/
|
/* | YEAR_P { $$ = make_str("year"); }*/
|
||||||
| ZONE { $$ = make_str("zone"); }
|
| ZONE { $$ = make_str("zone"); }
|
||||||
;
|
;
|
||||||
@ -6472,6 +6628,14 @@ col_name_keyword:
|
|||||||
/* VALUES creates a shift/reduce problem if listed here
|
/* VALUES creates a shift/reduce problem if listed here
|
||||||
| VALUES { $$ = make_str("values"); } */
|
| VALUES { $$ = make_str("values"); } */
|
||||||
| VARCHAR { $$ = make_str("varchar"); }
|
| VARCHAR { $$ = make_str("varchar"); }
|
||||||
|
| XMLATTRIBUTES { $$ = make_str("xmlattributes"); }
|
||||||
|
| XMLCONCAT { $$ = make_str("xmlconcat"); }
|
||||||
|
| XMLELEMENT { $$ = make_str("xmlelement"); }
|
||||||
|
| XMLFOREST { $$ = make_str("xmlforest"); }
|
||||||
|
| XMLPARSE { $$ = make_str("xmlparse"); }
|
||||||
|
| XMLPI { $$ = make_str("xmlpi"); }
|
||||||
|
| XMLROOT { $$ = make_str("xmlroot"); }
|
||||||
|
| XMLSERIALIZE { $$ = make_str("xmlserialize"); }
|
||||||
;
|
;
|
||||||
|
|
||||||
/* Function identifier --- keywords that can be function names.
|
/* Function identifier --- keywords that can be function names.
|
||||||
@ -6484,7 +6648,7 @@ col_name_keyword:
|
|||||||
* productions in a_expr to support the goofy SQL9x argument syntax.
|
* productions in a_expr to support the goofy SQL9x argument syntax.
|
||||||
* - thomas 2000-11-28
|
* - thomas 2000-11-28
|
||||||
*/
|
*/
|
||||||
func_name_keyword:
|
type_func_name_keyword:
|
||||||
AUTHORIZATION { $$ = make_str("authorization"); }
|
AUTHORIZATION { $$ = make_str("authorization"); }
|
||||||
| BETWEEN { $$ = make_str("between"); }
|
| BETWEEN { $$ = make_str("between"); }
|
||||||
| BINARY { $$ = make_str("binary"); }
|
| BINARY { $$ = make_str("binary"); }
|
||||||
@ -6764,7 +6928,7 @@ c_anything: IDENT { $$ = $1; }
|
|||||||
|
|
||||||
%%
|
%%
|
||||||
|
|
||||||
void yyerror( char * error)
|
void base_yyerror(const char * error)
|
||||||
{
|
{
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
@ -6773,4 +6937,15 @@ void yyerror( char * error)
|
|||||||
mmerror(PARSE_ERROR, ET_ERROR, buf);
|
mmerror(PARSE_ERROR, ET_ERROR, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void parser_init(void)
|
||||||
|
{
|
||||||
|
/* This function is empty. It only exists for compatibility with the backend parser right now. */
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Must undefine base_yylex before including pgc.c, since we want it
|
||||||
|
* to create the function base_yylex not filtered_base_yylex.
|
||||||
|
*/
|
||||||
|
#undef base_yylex
|
||||||
|
|
||||||
#include "pgc.c"
|
#include "pgc.c"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $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"
|
#include "postgres_fe.h"
|
||||||
|
|
||||||
@ -254,7 +254,7 @@ ECPGdump_a_type(FILE *o, const char *name, struct ECPGtype * type,
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (!IS_SIMPLE_TYPE(type->u.element->type))
|
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,
|
ECPGdump_a_simple(o, name,
|
||||||
type->u.element->type,
|
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);
|
ECPGdump_a_struct(o, name, ind_name, make_str("1"), type, ind_type, NULL, prefix, ind_prefix);
|
||||||
break;
|
break;
|
||||||
case ECPGt_union: /* cannot dump a complete union */
|
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;
|
break;
|
||||||
case ECPGt_char_variable:
|
case ECPGt_char_variable:
|
||||||
if (indicator_set && (ind_type->type == ECPGt_struct || ind_type->type == ECPGt_array))
|
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)
|
switch (type->u.element->type)
|
||||||
{
|
{
|
||||||
case ECPGt_array:
|
case ECPGt_array:
|
||||||
yyerror("internal error, found multidimensional array\n");
|
base_yyerror("internal error, found multidimensional array\n");
|
||||||
break;
|
break;
|
||||||
case ECPGt_struct:
|
case ECPGt_struct:
|
||||||
case ECPGt_union:
|
case ECPGt_union:
|
||||||
@ -531,7 +531,7 @@ ECPGfree_type(struct ECPGtype * type)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (!IS_SIMPLE_TYPE(type->u.element->type))
|
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);
|
free(type->u.element);
|
||||||
}
|
}
|
||||||
|
@ -99,14 +99,14 @@ int main(void)
|
|||||||
#line 27 "rnull.pgc"
|
#line 27 "rnull.pgc"
|
||||||
|
|
||||||
|
|
||||||
{ ECPGconnect(__LINE__, 1, "regress1" , NULL,NULL , NULL, 0);
|
{ ECPGconnect(__LINE__, 1, "regress1" , NULL, NULL , NULL, 0);
|
||||||
#line 29 "rnull.pgc"
|
#line 29 "rnull.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||||
#line 29 "rnull.pgc"
|
#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"
|
#line 33 "rnull.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||||
|
@ -2,19 +2,19 @@
|
|||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
|
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 31 Ok: CREATE TABLE
|
[NO_PID]: ECPGexecute line 31 Ok: CREATE TABLE
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGtrans line 34 action = commit connection = regress1
|
[NO_PID]: ECPGtrans line 34 action = commit connection = regress1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 36 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 36 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGtrans line 39 action = commit connection = regress1
|
[NO_PID]: ECPGtrans line 39 action = commit connection = regress1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 52 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 52 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
|
@ -50,7 +50,7 @@ int main(void)
|
|||||||
#line 18 "test_informix.pgc"
|
#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"
|
#line 20 "test_informix.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode < 0) dosqlprint ( );}
|
if (sqlca.sqlcode < 0) dosqlprint ( );}
|
||||||
@ -127,7 +127,7 @@ if (sqlca.sqlcode < 0) dosqlprint ( );}
|
|||||||
|
|
||||||
|
|
||||||
/* this however should be ok */
|
/* 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"
|
#line 43 "test_informix.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode < 0) dosqlprint ( );}
|
if (sqlca.sqlcode < 0) dosqlprint ( );}
|
||||||
|
@ -6,13 +6,13 @@
|
|||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 23 Ok: CREATE TABLE
|
[NO_PID]: ECPGexecute line 23 Ok: CREATE TABLE
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 27 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 27 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGtrans line 28 action = commit connection = regress1
|
[NO_PID]: ECPGtrans line 28 action = commit connection = regress1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 31: Error: ERROR: duplicate key violates unique constraint "test_pkey"
|
[NO_PID]: ECPGexecute line 31: Error: ERROR: duplicate key violates unique constraint "test_pkey"
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
@ -20,7 +20,7 @@
|
|||||||
[NO_PID]: sqlca: code: -239, state: 23505
|
[NO_PID]: sqlca: code: -239, state: 23505
|
||||||
[NO_PID]: ECPGtrans line 33 action = rollback connection = regress1
|
[NO_PID]: ECPGtrans line 33 action = rollback connection = regress1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 35 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 35 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
@ -34,7 +34,7 @@
|
|||||||
[NO_PID]: sqlca: code: -284, state: 21000
|
[NO_PID]: sqlca: code: -284, state: 21000
|
||||||
[NO_PID]: ECPGtrans line 40 action = rollback connection = regress1
|
[NO_PID]: ECPGtrans line 40 action = rollback connection = regress1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 43: Correctly got 1 tuples with 1 fields
|
[NO_PID]: ECPGexecute line 43: Correctly got 1 tuples with 1 fields
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
@ -64,7 +64,7 @@
|
|||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: raising sqlcode 100 in line 54, 'No data found in line 54.'.
|
[NO_PID]: raising sqlcode 100 in line 54, 'No data found in line 54.'.
|
||||||
[NO_PID]: sqlca: code: 100, state: 02000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 72 Ok: DELETE 0
|
[NO_PID]: ECPGexecute line 72 Ok: DELETE 0
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
|
@ -172,7 +172,7 @@ int main(void)
|
|||||||
ECPGdebug(1, stderr);
|
ECPGdebug(1, stderr);
|
||||||
|
|
||||||
strcpy(dbname, "regress1");
|
strcpy(dbname, "regress1");
|
||||||
{ ECPGconnect(__LINE__, 1, dbname , NULL,NULL , NULL, 0);
|
{ ECPGconnect(__LINE__, 1, dbname , NULL, NULL , NULL, 0);
|
||||||
#line 63 "test_informix2.pgc"
|
#line 63 "test_informix2.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode < 0) sqlprint();}
|
if (sqlca.sqlcode < 0) sqlprint();}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 68 Ok: CREATE TABLE
|
[NO_PID]: ECPGexecute line 68 Ok: CREATE TABLE
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 71 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 71 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
@ -28,7 +28,7 @@
|
|||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: 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]: 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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 95 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 95 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
|
@ -48,10 +48,10 @@ main(void)
|
|||||||
ECPGdebug(1, stderr);
|
ECPGdebug(1, stderr);
|
||||||
|
|
||||||
strcpy(id, "first");
|
strcpy(id, "first");
|
||||||
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL,NULL , id, 0); }
|
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , id, 0); }
|
||||||
#line 24 "test2.pgc"
|
#line 24 "test2.pgc"
|
||||||
|
|
||||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , "second", 0); }
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , "second", 0); }
|
||||||
#line 25 "test2.pgc"
|
#line 25 "test2.pgc"
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,10 +47,10 @@ main(void)
|
|||||||
ECPGdebug(1, stderr);
|
ECPGdebug(1, stderr);
|
||||||
|
|
||||||
strcpy(id, "first");
|
strcpy(id, "first");
|
||||||
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL,NULL , id, 0); }
|
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , id, 0); }
|
||||||
#line 23 "test3.pgc"
|
#line 23 "test3.pgc"
|
||||||
|
|
||||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , "second", 0); }
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , "second", 0); }
|
||||||
#line 24 "test3.pgc"
|
#line 24 "test3.pgc"
|
||||||
|
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ main(void)
|
|||||||
#line 31 "test3.pgc"
|
#line 31 "test3.pgc"
|
||||||
|
|
||||||
|
|
||||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , "second", 0); }
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , "second", 0); }
|
||||||
#line 33 "test3.pgc"
|
#line 33 "test3.pgc"
|
||||||
|
|
||||||
/* will close "second" */
|
/* will close "second" */
|
||||||
@ -79,7 +79,7 @@ main(void)
|
|||||||
#line 35 "test3.pgc"
|
#line 35 "test3.pgc"
|
||||||
|
|
||||||
|
|
||||||
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL,NULL , "second", 0); }
|
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , "second", 0); }
|
||||||
#line 37 "test3.pgc"
|
#line 37 "test3.pgc"
|
||||||
|
|
||||||
{ ECPGdisconnect(__LINE__, "ALL");}
|
{ ECPGdisconnect(__LINE__, "ALL");}
|
||||||
|
@ -29,7 +29,7 @@ main(void)
|
|||||||
{
|
{
|
||||||
ECPGdebug(1, stderr);
|
ECPGdebug(1, stderr);
|
||||||
|
|
||||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , "main", 0); }
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , "main", 0); }
|
||||||
#line 13 "test4.pgc"
|
#line 13 "test4.pgc"
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ main(void)
|
|||||||
|
|
||||||
ECPGdebug(1, stderr);
|
ECPGdebug(1, stderr);
|
||||||
|
|
||||||
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL,NULL , "main", 0); }
|
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , "main", 0); }
|
||||||
#line 22 "test5.pgc"
|
#line 22 "test5.pgc"
|
||||||
|
|
||||||
{ ECPGdo(__LINE__, 0, 1, NULL, "alter user connectuser encrypted password 'connectpw'", ECPGt_EOIT, ECPGt_EORT);}
|
{ 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(db, "connectdb");
|
||||||
strcpy(id, "main");
|
strcpy(id, "main");
|
||||||
{ ECPGconnect(__LINE__, 0, db , NULL,NULL , id, 0); }
|
{ ECPGconnect(__LINE__, 0, db , NULL, NULL , id, 0); }
|
||||||
#line 28 "test5.pgc"
|
#line 28 "test5.pgc"
|
||||||
|
|
||||||
{ ECPGdisconnect(__LINE__, id);}
|
{ ECPGdisconnect(__LINE__, id);}
|
||||||
#line 29 "test5.pgc"
|
#line 29 "test5.pgc"
|
||||||
|
|
||||||
|
|
||||||
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL,NULL , "main", 0); }
|
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , "main", 0); }
|
||||||
#line 31 "test5.pgc"
|
#line 31 "test5.pgc"
|
||||||
|
|
||||||
{ ECPGdisconnect(__LINE__, "main");}
|
{ ECPGdisconnect(__LINE__, "main");}
|
||||||
#line 32 "test5.pgc"
|
#line 32 "test5.pgc"
|
||||||
|
|
||||||
|
|
||||||
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL,NULL , "main", 0); }
|
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , "main", 0); }
|
||||||
#line 34 "test5.pgc"
|
#line 34 "test5.pgc"
|
||||||
|
|
||||||
{ ECPGdisconnect(__LINE__, "main");}
|
{ ECPGdisconnect(__LINE__, "main");}
|
||||||
#line 35 "test5.pgc"
|
#line 35 "test5.pgc"
|
||||||
|
|
||||||
|
|
||||||
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL,NULL , "main", 0); }
|
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , "main", 0); }
|
||||||
#line 37 "test5.pgc"
|
#line 37 "test5.pgc"
|
||||||
|
|
||||||
{ ECPGdisconnect(__LINE__, "main");}
|
{ ECPGdisconnect(__LINE__, "main");}
|
||||||
@ -127,10 +127,10 @@ main(void)
|
|||||||
|
|
||||||
|
|
||||||
/* connect twice */
|
/* connect twice */
|
||||||
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL,NULL , "main", 0); }
|
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , "main", 0); }
|
||||||
#line 62 "test5.pgc"
|
#line 62 "test5.pgc"
|
||||||
|
|
||||||
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL,NULL , "main", 0); }
|
{ ECPGconnect(__LINE__, 0, "connectdb" , NULL, NULL , "main", 0); }
|
||||||
#line 63 "test5.pgc"
|
#line 63 "test5.pgc"
|
||||||
|
|
||||||
{ ECPGdisconnect(__LINE__, "main");}
|
{ ECPGdisconnect(__LINE__, "main");}
|
||||||
|
@ -60,13 +60,13 @@ main(void)
|
|||||||
/* exec sql whenever sqlerror do sqlprint ( ) ; */
|
/* exec sql whenever sqlerror do sqlprint ( ) ; */
|
||||||
#line 27 "dt_test.pgc"
|
#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"
|
#line 28 "dt_test.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||||
#line 28 "dt_test.pgc"
|
#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"
|
#line 29 "dt_test.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
|
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 29 Ok: CREATE TABLE
|
[NO_PID]: ECPGexecute line 29 Ok: CREATE TABLE
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
@ -10,7 +10,7 @@
|
|||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 30 Ok: SET
|
[NO_PID]: ECPGexecute line 30 Ok: SET
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 35 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 35 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
|
@ -55,7 +55,7 @@ main(void)
|
|||||||
#line 30 "num_test.pgc"
|
#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"
|
#line 32 "num_test.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||||
|
@ -32,7 +32,7 @@ int main(void)
|
|||||||
{
|
{
|
||||||
ECPGdebug(1, stderr);
|
ECPGdebug(1, stderr);
|
||||||
|
|
||||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
|
||||||
#line 17 "comment.pgc"
|
#line 17 "comment.pgc"
|
||||||
|
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ main(void)
|
|||||||
|
|
||||||
ECPGdebug(1, stderr);
|
ECPGdebug(1, stderr);
|
||||||
|
|
||||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0);
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0);
|
||||||
#line 34 "define.pgc"
|
#line 34 "define.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode < 0) sqlprint();}
|
if (sqlca.sqlcode < 0) sqlprint();}
|
||||||
|
@ -111,7 +111,7 @@ main (void)
|
|||||||
ECPGdebug (1, stderr);
|
ECPGdebug (1, stderr);
|
||||||
|
|
||||||
empl.idnum = 1;
|
empl.idnum = 1;
|
||||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
|
||||||
#line 43 "type.pgc"
|
#line 43 "type.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode)
|
if (sqlca.sqlcode)
|
||||||
|
@ -120,7 +120,7 @@ main (void)
|
|||||||
ECPGdebug(1, stderr);
|
ECPGdebug(1, stderr);
|
||||||
|
|
||||||
strcpy(msg, "connect");
|
strcpy(msg, "connect");
|
||||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0);
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0);
|
||||||
#line 43 "variable.pgc"
|
#line 43 "variable.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode < 0) sqlprint();}
|
if (sqlca.sqlcode < 0) sqlprint();}
|
||||||
@ -136,7 +136,7 @@ if (sqlca.sqlcode < 0) sqlprint();}
|
|||||||
|
|
||||||
|
|
||||||
strcpy(msg, "create");
|
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"
|
#line 49 "variable.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode < 0) sqlprint();}
|
if (sqlca.sqlcode < 0) sqlprint();}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 46 Ok: SET
|
[NO_PID]: ECPGexecute line 46 Ok: SET
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 49 Ok: CREATE TABLE
|
[NO_PID]: ECPGexecute line 49 Ok: CREATE TABLE
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
|
@ -59,7 +59,7 @@ int main(void)
|
|||||||
|
|
||||||
ECPGdebug(1, stderr);
|
ECPGdebug(1, stderr);
|
||||||
|
|
||||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0);
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0);
|
||||||
#line 31 "whenever.pgc"
|
#line 31 "whenever.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode < 0) sqlprint();}
|
if (sqlca.sqlcode < 0) sqlprint();}
|
||||||
|
@ -135,7 +135,7 @@ main (void)
|
|||||||
|
|
||||||
ECPGdebug(1, stderr);
|
ECPGdebug(1, stderr);
|
||||||
|
|
||||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0);
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0);
|
||||||
#line 27 "array.pgc"
|
#line 27 "array.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode < 0) sqlprint();}
|
if (sqlca.sqlcode < 0) sqlprint();}
|
||||||
|
@ -66,7 +66,7 @@ main (void)
|
|||||||
ECPGdebug (1, stderr);
|
ECPGdebug (1, stderr);
|
||||||
|
|
||||||
empl.idnum = 1;
|
empl.idnum = 1;
|
||||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
|
||||||
#line 28 "binary.pgc"
|
#line 28 "binary.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode)
|
if (sqlca.sqlcode)
|
||||||
@ -75,7 +75,7 @@ main (void)
|
|||||||
exit (sqlca.sqlcode);
|
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"
|
#line 36 "binary.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode)
|
if (sqlca.sqlcode)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
|
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 35 Ok: CREATE TABLE
|
[NO_PID]: ECPGexecute line 35 Ok: CREATE TABLE
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
|
@ -106,12 +106,12 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
ECPGdebug(1,stderr);
|
ECPGdebug(1,stderr);
|
||||||
|
|
||||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
|
||||||
#line 15 "code100.pgc"
|
#line 15 "code100.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
|
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"
|
#line 20 "code100.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
|
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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
|
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 18 Ok: CREATE TABLE
|
[NO_PID]: ECPGexecute line 18 Ok: CREATE TABLE
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGtrans line 22 action = commit connection = regress1
|
[NO_PID]: ECPGtrans line 22 action = commit connection = regress1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGtrans line 31 action = commit connection = regress1
|
[NO_PID]: ECPGtrans line 31 action = commit connection = regress1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 34 Ok: UPDATE 0
|
[NO_PID]: ECPGexecute line 34 Ok: UPDATE 0
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: raising sqlcode 100 in line 34, 'No data found in line 34.'.
|
[NO_PID]: raising sqlcode 100 in line 34, 'No data found in line 34.'.
|
||||||
[NO_PID]: sqlca: code: 100, state: 02000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 38 Ok: DELETE 0
|
[NO_PID]: ECPGexecute line 38 Ok: DELETE 0
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: raising sqlcode 100 in line 38, 'No data found in line 38.'.
|
[NO_PID]: raising sqlcode 100 in line 38, 'No data found in line 38.'.
|
||||||
[NO_PID]: sqlca: code: 100, state: 02000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 41 Ok: INSERT 0 0
|
[NO_PID]: ECPGexecute line 41 Ok: INSERT 0 0
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
|
@ -107,7 +107,7 @@ main ()
|
|||||||
|
|
||||||
ECPGdebug (1, stderr);
|
ECPGdebug (1, stderr);
|
||||||
|
|
||||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0);
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0);
|
||||||
#line 19 "copystdout.pgc"
|
#line 19 "copystdout.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode < 0) sqlprint();}
|
if (sqlca.sqlcode < 0) sqlprint();}
|
||||||
|
@ -6,15 +6,15 @@
|
|||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 20 Ok: CREATE TABLE
|
[NO_PID]: ECPGexecute line 20 Ok: CREATE TABLE
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 21 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 21 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 22 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 22 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 23 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 23 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
|
@ -113,14 +113,14 @@ int main(void)
|
|||||||
/* exec sql whenever sqlerror do sqlprint ( ) ; */
|
/* exec sql whenever sqlerror do sqlprint ( ) ; */
|
||||||
#line 16 "define.pgc"
|
#line 16 "define.pgc"
|
||||||
|
|
||||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0);
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0);
|
||||||
#line 17 "define.pgc"
|
#line 17 "define.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||||
#line 17 "define.pgc"
|
#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"
|
#line 19 "define.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
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_int,&(i),(long)1,(long)1,sizeof(int),
|
||||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
|
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
|
||||||
ECPGt_char,(s),(long)200,(long)1,(200)*sizeof(char),
|
ECPGt_char,(s),(long)200,(long)1,(200)*sizeof(char),
|
||||||
|
@ -2,23 +2,23 @@
|
|||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
|
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 19 Ok: CREATE TABLE
|
[NO_PID]: ECPGexecute line 19 Ok: CREATE TABLE
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 20 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 20 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 23 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 23 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 31 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 31 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 36: Correctly got 1 tuples with 2 fields
|
[NO_PID]: ECPGexecute line 36: Correctly got 1 tuples with 2 fields
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
@ -26,7 +26,7 @@
|
|||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGget_data line 36: RESULT: 29-abcdef offset: -1 array: Yes
|
[NO_PID]: ECPGget_data line 36: RESULT: 29-abcdef offset: -1 array: Yes
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 42 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 42 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
|
@ -96,14 +96,14 @@ if (sqlca.sqlcode < 0) sqlprint();}
|
|||||||
#line 25 "desc.pgc"
|
#line 25 "desc.pgc"
|
||||||
|
|
||||||
|
|
||||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0);
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0);
|
||||||
#line 27 "desc.pgc"
|
#line 27 "desc.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode < 0) sqlprint();}
|
if (sqlca.sqlcode < 0) sqlprint();}
|
||||||
#line 27 "desc.pgc"
|
#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"
|
#line 29 "desc.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode < 0) sqlprint();}
|
if (sqlca.sqlcode < 0) sqlprint();}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
|
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 29 Ok: CREATE TABLE
|
[NO_PID]: ECPGexecute line 29 Ok: CREATE TABLE
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
|
@ -171,7 +171,7 @@ int main(void)
|
|||||||
/* exec sql whenever sqlerror do sqlprint ( ) ; */
|
/* exec sql whenever sqlerror do sqlprint ( ) ; */
|
||||||
#line 32 "dynalloc.pgc"
|
#line 32 "dynalloc.pgc"
|
||||||
|
|
||||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0);
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0);
|
||||||
#line 33 "dynalloc.pgc"
|
#line 33 "dynalloc.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||||
@ -185,7 +185,7 @@ if (sqlca.sqlcode < 0) sqlprint ( );}
|
|||||||
#line 35 "dynalloc.pgc"
|
#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"
|
#line 37 "dynalloc.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||||
@ -210,7 +210,7 @@ if (sqlca.sqlcode < 0) sqlprint ( );}
|
|||||||
if (sqlca.sqlcode < 0) sqlprint ( );
|
if (sqlca.sqlcode < 0) sqlprint ( );
|
||||||
#line 41 "dynalloc.pgc"
|
#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_descriptor, "mydesc", 0L, 0L, 0L,
|
||||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
|
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
|
||||||
#line 42 "dynalloc.pgc"
|
#line 42 "dynalloc.pgc"
|
||||||
|
@ -6,19 +6,19 @@
|
|||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 35 Ok: SET
|
[NO_PID]: ECPGexecute line 35 Ok: SET
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 37 Ok: CREATE TABLE
|
[NO_PID]: ECPGexecute line 37 Ok: CREATE TABLE
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 38 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 38 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 39 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 39 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 42: Correctly got 2 tuples with 9 fields
|
[NO_PID]: ECPGexecute line 42: Correctly got 2 tuples with 9 fields
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
|
@ -125,7 +125,7 @@ int main(void)
|
|||||||
/* exec sql whenever sqlerror do sqlprint ( ) ; */
|
/* exec sql whenever sqlerror do sqlprint ( ) ; */
|
||||||
#line 19 "dynalloc2.pgc"
|
#line 19 "dynalloc2.pgc"
|
||||||
|
|
||||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0);
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0);
|
||||||
#line 20 "dynalloc2.pgc"
|
#line 20 "dynalloc2.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||||
@ -139,7 +139,7 @@ if (sqlca.sqlcode < 0) sqlprint ( );}
|
|||||||
#line 22 "dynalloc2.pgc"
|
#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"
|
#line 24 "dynalloc2.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode < 0) sqlprint ( );}
|
if (sqlca.sqlcode < 0) sqlprint ( );}
|
||||||
|
@ -6,31 +6,31 @@
|
|||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 22 Ok: SET
|
[NO_PID]: ECPGexecute line 22 Ok: SET
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 24 Ok: CREATE TABLE
|
[NO_PID]: ECPGexecute line 24 Ok: CREATE TABLE
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 25 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 25 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 27 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 27 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 28 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 28 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 29 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 29 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 30 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 30 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
|
@ -219,7 +219,7 @@ if (sqlca.sqlcode < 0) error ( );
|
|||||||
#line 45 "dyntest.pgc"
|
#line 45 "dyntest.pgc"
|
||||||
|
|
||||||
|
|
||||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0);
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0);
|
||||||
#line 47 "dyntest.pgc"
|
#line 47 "dyntest.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode < 0) error ( );}
|
if (sqlca.sqlcode < 0) error ( );}
|
||||||
@ -233,7 +233,7 @@ if (sqlca.sqlcode < 0) error ( );}
|
|||||||
#line 49 "dyntest.pgc"
|
#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"
|
#line 53 "dyntest.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode < 0) error ( );}
|
if (sqlca.sqlcode < 0) error ( );}
|
||||||
|
@ -6,15 +6,15 @@
|
|||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 49 Ok: SET
|
[NO_PID]: ECPGexecute line 49 Ok: SET
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 51 Ok: CREATE TABLE
|
[NO_PID]: ECPGexecute line 51 Ok: CREATE TABLE
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 54 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 54 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 55 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 55 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
|
@ -59,7 +59,7 @@ main(void)
|
|||||||
|
|
||||||
ECPGdebug(1, stderr);
|
ECPGdebug(1, stderr);
|
||||||
|
|
||||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , "main", 0);
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , "main", 0);
|
||||||
#line 24 "execute.pgc"
|
#line 24 "execute.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode < 0) sqlprint();}
|
if (sqlca.sqlcode < 0) sqlprint();}
|
||||||
|
@ -38,7 +38,7 @@ int main(int argc, char* argv[]) {
|
|||||||
|
|
||||||
|
|
||||||
ECPGdebug(1, stderr);
|
ECPGdebug(1, stderr);
|
||||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
|
||||||
#line 14 "fetch.pgc"
|
#line 14 "fetch.pgc"
|
||||||
|
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ int main(int argc, char* argv[]) {
|
|||||||
#line 17 "fetch.pgc"
|
#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"
|
#line 19 "fetch.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlwarn[0] == 'W') sqlprint();
|
if (sqlca.sqlwarn[0] == 'W') sqlprint();
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
|
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 19 Ok: CREATE TABLE
|
[NO_PID]: ECPGexecute line 19 Ok: CREATE TABLE
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
int main(int argc, char* argv[]) {
|
int main(int argc, char* argv[]) {
|
||||||
|
|
||||||
ECPGdebug(1, stderr);
|
ECPGdebug(1, stderr);
|
||||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
|
||||||
#line 10 "func.pgc"
|
#line 10 "func.pgc"
|
||||||
|
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ int main(int argc, char* argv[]) {
|
|||||||
#line 14 "func.pgc"
|
#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"
|
#line 16 "func.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlwarn[0] == 'W') sqlprint();
|
if (sqlca.sqlwarn[0] == 'W') sqlprint();
|
||||||
@ -50,7 +50,7 @@ if (sqlca.sqlcode < 0) sqlprint();}
|
|||||||
#line 16 "func.pgc"
|
#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\
|
BEGIN\
|
||||||
RAISE WARNING 'Notice: TG_NAME=%, TG WHEN=%', TG_NAME, TG_WHEN;\
|
RAISE WARNING 'Notice: TG_NAME=%, TG WHEN=%', TG_NAME, TG_WHEN;\
|
||||||
RETURN NEW;\
|
RETURN NEW;\
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGsetcommit line 12 action = on connection = regress1
|
[NO_PID]: ECPGsetcommit line 12 action = on connection = regress1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 16 Ok: CREATE TABLE
|
[NO_PID]: ECPGexecute line 16 Ok: CREATE TABLE
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 18 Ok: CREATE FUNCTION
|
[NO_PID]: ECPGexecute line 18 Ok: CREATE FUNCTION
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
@ -16,7 +16,7 @@
|
|||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 26 Ok: CREATE TRIGGER
|
[NO_PID]: ECPGexecute line 26 Ok: CREATE TRIGGER
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: 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]: Notice: TG_NAME=my_table_check_trigger, TG WHEN=BEFORE[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: raising sqlcode 0
|
[NO_PID]: raising sqlcode 0
|
||||||
@ -24,7 +24,7 @@
|
|||||||
[NO_PID]: ECPGexecute line 32 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 32 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 01000
|
[NO_PID]: sqlca: code: 0, state: 01000
|
||||||
sql error Notice: TG_NAME=my_table_check_trigger, TG WHEN=BEFORE
|
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]: 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]: Notice: TG_NAME=my_table_check_trigger, TG WHEN=BEFORE[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: raising sqlcode 0
|
[NO_PID]: raising sqlcode 0
|
||||||
|
@ -110,14 +110,14 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
ECPGdebug(1,stderr);
|
ECPGdebug(1,stderr);
|
||||||
|
|
||||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
|
||||||
#line 16 "indicators.pgc"
|
#line 16 "indicators.pgc"
|
||||||
|
|
||||||
{ ECPGsetcommit(__LINE__, "off", NULL);}
|
{ ECPGsetcommit(__LINE__, "off", NULL);}
|
||||||
#line 17 "indicators.pgc"
|
#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"
|
#line 22 "indicators.pgc"
|
||||||
|
|
||||||
{ ECPGtrans(__LINE__, NULL, "commit");}
|
{ ECPGtrans(__LINE__, NULL, "commit");}
|
||||||
|
@ -4,21 +4,21 @@
|
|||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGsetcommit line 17 action = off connection = regress1
|
[NO_PID]: ECPGsetcommit line 17 action = off connection = regress1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 19 Ok: CREATE TABLE
|
[NO_PID]: ECPGexecute line 19 Ok: CREATE TABLE
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGtrans line 23 action = commit connection = regress1
|
[NO_PID]: ECPGtrans line 23 action = commit connection = regress1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 25 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 25 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 28 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 28 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 30 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 30 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
@ -42,7 +42,7 @@
|
|||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGget_data line 37: RESULT: 5 offset: -1 array: Yes
|
[NO_PID]: ECPGget_data line 37: RESULT: 5 offset: -1 array: Yes
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 42 Ok: UPDATE 1
|
[NO_PID]: ECPGexecute line 42 Ok: UPDATE 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
|
126
src/interfaces/ecpg/test/expected/sql-parser.c
Normal file
126
src/interfaces/ecpg/test/expected/sql-parser.c
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
/* 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;
|
||||||
|
}
|
38
src/interfaces/ecpg/test/expected/sql-parser.stderr
Normal file
38
src/interfaces/ecpg/test/expected/sql-parser.stderr
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
[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
|
3
src/interfaces/ecpg/test/expected/sql-parser.stdout
Normal file
3
src/interfaces/ecpg/test/expected/sql-parser.stdout
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
item[0] = 1
|
||||||
|
item[1] = 2
|
||||||
|
item[2] = -1
|
@ -34,7 +34,7 @@ int main(int argc, char* argv[]) {
|
|||||||
|
|
||||||
|
|
||||||
ECPGdebug(1, stderr);
|
ECPGdebug(1, stderr);
|
||||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
|
||||||
#line 13 "quote.pgc"
|
#line 13 "quote.pgc"
|
||||||
|
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ int main(int argc, char* argv[]) {
|
|||||||
#line 17 "quote.pgc"
|
#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"
|
#line 19 "quote.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlwarn[0] == 'W') sqlprint();
|
if (sqlca.sqlwarn[0] == 'W') sqlprint();
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGsetcommit line 15 action = on connection = regress1
|
[NO_PID]: ECPGsetcommit line 15 action = on connection = regress1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 19 Ok: CREATE TABLE
|
[NO_PID]: ECPGexecute line 19 Ok: CREATE TABLE
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
|
@ -34,7 +34,7 @@ int main(int argc, char* argv[]) {
|
|||||||
|
|
||||||
|
|
||||||
ECPGdebug(1, stderr);
|
ECPGdebug(1, stderr);
|
||||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
|
||||||
#line 13 "show.pgc"
|
#line 13 "show.pgc"
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ int main(int argc, char* argv[]) {
|
|||||||
|
|
||||||
|
|
||||||
ECPGdebug(1, stderr);
|
ECPGdebug(1, stderr);
|
||||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
|
||||||
#line 13 "update.pgc"
|
#line 13 "update.pgc"
|
||||||
|
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ if (sqlca.sqlcode < 0) sqlprint();}
|
|||||||
#line 26 "update.pgc"
|
#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_int,(i1),(long)1,(long)3,sizeof(int),
|
||||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
|
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
|
||||||
ECPGt_int,(i2),(long)1,(long)3,sizeof(int),
|
ECPGt_int,(i2),(long)1,(long)3,sizeof(int),
|
||||||
|
@ -6,15 +6,15 @@
|
|||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 18 Ok: CREATE TABLE
|
[NO_PID]: ECPGexecute line 18 Ok: CREATE TABLE
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 20 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 20 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 21 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 21 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 22 Ok: INSERT 0 1
|
[NO_PID]: ECPGexecute line 22 Ok: INSERT 0 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
@ -22,7 +22,7 @@
|
|||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 24 Ok: UPDATE 3
|
[NO_PID]: ECPGexecute line 24 Ok: UPDATE 3
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 25 Ok: UPDATE 1
|
[NO_PID]: ECPGexecute line 25 Ok: UPDATE 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
@ -30,7 +30,7 @@
|
|||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 26 Ok: UPDATE 1
|
[NO_PID]: ECPGexecute line 26 Ok: UPDATE 1
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[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]: sqlca: code: 0, state: 00000
|
||||||
[NO_PID]: ECPGexecute line 28: Correctly got 3 tuples with 2 fields
|
[NO_PID]: ECPGexecute line 28: Correctly got 3 tuples with 2 fields
|
||||||
[NO_PID]: sqlca: code: 0, state: 00000
|
[NO_PID]: sqlca: code: 0, state: 00000
|
||||||
|
@ -62,7 +62,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
|
|
||||||
/* setup test_thread table */
|
/* setup test_thread table */
|
||||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
|
||||||
#line 41 "thread.pgc"
|
#line 41 "thread.pgc"
|
||||||
|
|
||||||
{ ECPGdo(__LINE__, 0, 1, NULL, "drop table test_thread ", ECPGt_EOIT, ECPGt_EORT);}
|
{ 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");}
|
{ ECPGtrans(__LINE__, NULL, "commit");}
|
||||||
#line 43 "thread.pgc"
|
#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"
|
#line 48 "thread.pgc"
|
||||||
|
|
||||||
{ ECPGtrans(__LINE__, NULL, "commit");}
|
{ ECPGtrans(__LINE__, NULL, "commit");}
|
||||||
@ -101,7 +101,7 @@ int main(int argc, char *argv[])
|
|||||||
free(threads);
|
free(threads);
|
||||||
|
|
||||||
/* and check results */
|
/* and check results */
|
||||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
|
||||||
#line 72 "thread.pgc"
|
#line 72 "thread.pgc"
|
||||||
|
|
||||||
{ ECPGdo(__LINE__, 0, 1, NULL, "select count (*) from test_thread ", ECPGt_EOIT,
|
{ 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 ; */
|
/* exec sql whenever sqlerror sqlprint ; */
|
||||||
#line 94 "thread.pgc"
|
#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"
|
#line 95 "thread.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode < 0) sqlprint();}
|
if (sqlca.sqlcode < 0) sqlprint();}
|
||||||
|
@ -63,7 +63,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
|
|
||||||
/* setup test_thread table */
|
/* 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"
|
#line 42 "thread_implicit.pgc"
|
||||||
|
|
||||||
{ ECPGdo(__LINE__, 0, 1, NULL, "drop table test_thread ", ECPGt_EOIT, ECPGt_EORT);}
|
{ 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");}
|
{ ECPGtrans(__LINE__, NULL, "commit");}
|
||||||
#line 44 "thread_implicit.pgc"
|
#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"
|
#line 49 "thread_implicit.pgc"
|
||||||
|
|
||||||
{ ECPGtrans(__LINE__, NULL, "commit");}
|
{ ECPGtrans(__LINE__, NULL, "commit");}
|
||||||
@ -102,7 +102,7 @@ int main(int argc, char *argv[])
|
|||||||
free(threads);
|
free(threads);
|
||||||
|
|
||||||
/* and check results */
|
/* and check results */
|
||||||
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
|
||||||
#line 73 "thread_implicit.pgc"
|
#line 73 "thread_implicit.pgc"
|
||||||
|
|
||||||
{ ECPGdo(__LINE__, 0, 1, NULL, "select count (*) from test_thread ", ECPGt_EOIT,
|
{ 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 ; */
|
/* exec sql whenever sqlerror sqlprint ; */
|
||||||
#line 95 "thread_implicit.pgc"
|
#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"
|
#line 96 "thread_implicit.pgc"
|
||||||
|
|
||||||
if (sqlca.sqlcode < 0) sqlprint();}
|
if (sqlca.sqlcode < 0) sqlprint();}
|
||||||
|
@ -16,6 +16,7 @@ TESTS = array array.c \
|
|||||||
fetch fetch.c \
|
fetch fetch.c \
|
||||||
func func.c \
|
func func.c \
|
||||||
indicators indicators.c \
|
indicators indicators.c \
|
||||||
|
parser parser.c \
|
||||||
quote quote.c \
|
quote quote.c \
|
||||||
show show.c \
|
show show.c \
|
||||||
update update.c
|
update update.c
|
||||||
|
36
src/interfaces/ecpg/test/sql/parser.pgc
Normal file
36
src/interfaces/ecpg/test/sql/parser.pgc
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#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;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user