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

Commitb14158f

Browse files
author
Michael Meskes
committed
SQL defines are only used in SQL space in Informix mode.
1 parent5b2f4af commitb14158f

File tree

2 files changed

+25
-13
lines changed

2 files changed

+25
-13
lines changed

‎src/interfaces/ecpg/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1850,6 +1850,10 @@ Tue Jul 20 09:15:21 CEST 2004
18501850

18511851
- Synced parser and keyword list.
18521852
- Fixed handling of cyclic defines.
1853+
1854+
Mon Jul 26 09:04:53 CEST 2004
1855+
1856+
- SQL defines are only used in SQL space in Informix mode.
18531857
- Set pgtypes library version to 1.2.
18541858
- Set ecpg version to 3.2.0.
18551859
- Set compat library version to 1.2.

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

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*
1313
*
1414
* IDENTIFICATION
15-
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.130 2004/07/20 18:06:41 meskes Exp $
15+
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.131 2004/07/26 10:28:28 meskes Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -693,24 +693,32 @@ cppline{space}*#(.*\\{space})+.*
693693
ScanKeyword*keyword;
694694
struct_defines *ptr;
695695

696-
/* is it a define? */
697-
for (ptr = defines; ptr; ptr = ptr->next)
696+
if (INFORMIX_MODE)
698697
{
699-
if (strcmp(yytext, ptr->old) ==0 && ptr->used ==NULL)
698+
/* Informix uses SQL defines only in SQL space */
699+
ptr =NULL;
700+
}
701+
else
702+
{
703+
/* is it a define? */
704+
for (ptr = defines; ptr; ptr = ptr->next)
700705
{
701-
struct_yy_buffer *yb;
706+
if (strcmp(yytext, ptr->old) ==0 && ptr->used ==NULL)
707+
{
708+
struct_yy_buffer *yb;
702709

703-
yb =mm_alloc(sizeof(struct_yy_buffer));
710+
yb =mm_alloc(sizeof(struct_yy_buffer));
704711

705-
yb->buffer = YY_CURRENT_BUFFER;
706-
yb->lineno = yylineno;
707-
yb->filename =mm_strdup(input_filename);
708-
ptr->used = yb->next = yy_buffer;
712+
yb->buffer = YY_CURRENT_BUFFER;
713+
yb->lineno = yylineno;
714+
yb->filename =mm_strdup(input_filename);
715+
ptr->used = yb->next = yy_buffer;
709716

710-
yy_buffer = yb;
717+
yy_buffer = yb;
711718

712-
yy_scan_string(ptr->new);
713-
break;
719+
yy_scan_string(ptr->new);
720+
break;
721+
}
714722
}
715723
}
716724

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp