Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita0fed29

Browse files
author
Michael Meskes
committed
Sync and some minor cleanup/fixing work plus an EXEC SQL DESCRIBE prototype.
1 parent5666462 commita0fed29

File tree

6 files changed

+163
-114
lines changed

6 files changed

+163
-114
lines changed

‎src/interfaces/ecpg/ChangeLog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,6 +1458,13 @@ Thu May 29 15:45:57 CEST 2003
14581458

14591459
- Changed parsing of variables to be able to reference one attribute
14601460
of the n-th entry in an array of structs.
1461+
1462+
Fri May 30 10:29:49 CEST 2003
1463+
1464+
- Synced parser.
1465+
- Added a dummy rule for EXEC SQL DESCRIBE that throws an error
1466+
message.
1467+
- Some minor cleanup/bug fixing.
14611468
- Set ecpg version to 2.12.0.
14621469
- Set ecpg library to 3.4.2.
14631470
- Set pgtypes library to 1.0.0

‎src/interfaces/ecpg/preproc/ecpg.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.71 2003/05/27 14:36:00 meskes Exp $ */
1+
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.72 2003/05/30 08:39:00 meskes Exp $ */
22

33
/* New main for ecpg, the PostgreSQL embedded SQL precompiler. */
44
/* (C) Michael Meskes <meskes@postgresql.org> Feb 5th, 1998 */
@@ -169,6 +169,7 @@ main(int argc, char *const argv[])
169169
/* system_includes = true; */
170170
add_preprocessor_define("dec_t=Numeric");
171171
add_preprocessor_define("intrvl_t=Interval");
172+
add_preprocessor_define("dtime_t=Timestamp");
172173
}
173174
else
174175
{

‎src/interfaces/ecpg/preproc/ecpg_keywords.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* lexical token lookup for reserved words in postgres embedded SQL
55
*
66
* IDENTIFICATION
7-
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/ecpg_keywords.c,v 1.27 2002/10/21 13:09:31 meskes Exp $
7+
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/ecpg_keywords.c,v 1.28 2003/05/30 08:39:00 meskes Exp $
88
*
99
*-------------------------------------------------------------------------
1010
*/
@@ -38,6 +38,7 @@ static ScanKeyword ScanKeywords[] = {
3838
{"data",SQL_DATA},
3939
{"datetime_interval_code",SQL_DATETIME_INTERVAL_CODE},
4040
{"datetime_interval_precision",SQL_DATETIME_INTERVAL_PRECISION},
41+
{"describe",SQL_DESCRIBE},
4142
{"descriptor",SQL_DESCRIPTOR},
4243
{"disconnect",SQL_DISCONNECT},
4344
{"enum",SQL_ENUM},
@@ -54,6 +55,7 @@ static ScanKeyword ScanKeywords[] = {
5455
{"nullable",SQL_NULLABLE},
5556
{"octet_length",SQL_OCTET_LENGTH},
5657
{"open",SQL_OPEN},
58+
{"output",SQL_OUTPUT},
5759
{"reference",SQL_REFERENCE},
5860
{"release",SQL_RELEASE},
5961
{"returned_length",SQL_RETURNED_LENGTH},

‎src/interfaces/ecpg/preproc/pgc.l

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*
1313
*
1414
* IDENTIFICATION
15-
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.113 2003/05/29 13:59:26 meskes Exp $
15+
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.114 2003/05/30 08:39:01 meskes Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -569,33 +569,36 @@ cppline{space}*#(.*\\{space})+.*
569569
}
570570
}
571571

572-
/* Is it an SQL keyword? */
573-
keyword =ScanKeywordLookup(yytext);
574-
if (keyword !=NULL)
575-
return keyword->value;
572+
if (ptr ==NULL)
573+
{
574+
/* Is it an SQL keyword? */
575+
keyword =ScanKeywordLookup(yytext);
576+
if (keyword !=NULL)
577+
return keyword->value;
576578

577-
/* Is it an ECPG keyword? */
578-
keyword =ScanECPGKeywordLookup( yytext);
579-
if (keyword !=NULL)
580-
return keyword->value;
579+
/* Is it an ECPG keyword? */
580+
keyword =ScanECPGKeywordLookup( yytext);
581+
if (keyword !=NULL)
582+
return keyword->value;
581583

582-
/* Is it a C keyword? */
583-
keyword =ScanCKeywordLookup(yytext);
584-
if (keyword !=NULL)
585-
return keyword->value;
584+
/* Is it a C keyword? */
585+
keyword =ScanCKeywordLookup(yytext);
586+
if (keyword !=NULL)
587+
return keyword->value;
586588

587-
/*
588-
* None of the above. Return it as an identifier.
589-
*
590-
* The backend would attempt to truncate and case-fold
591-
* the identifier, but I see no good reason for ecpg
592-
* to do so; that's just another way that ecpg could get
593-
* out of step with the backend.
594-
*/
595-
if (ptr ==NULL)
596-
{
597-
yylval.str =mm_strdup(yytext);
598-
return IDENT;
589+
/*
590+
* None of the above. Return it as an identifier.
591+
*
592+
* The backend would attempt to truncate and case-fold
593+
* the identifier, but I see no good reason for ecpg
594+
* to do so; that's just another way that ecpg could get
595+
* out of step with the backend.
596+
*/
597+
if (ptr ==NULL)
598+
{
599+
yylval.str =mm_strdup(yytext);
600+
return IDENT;
601+
}
599602
}
600603
}
601604
<SQL>{other}{return yytext[0]; }

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp