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

Commit244d2d6

Browse files
author
Michael Meskes
committed
Added Informix "database" command.
1 parent72933a9 commit244d2d6

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

‎src/interfaces/ecpg/include/ecpglib.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,10 @@ boolECPGdisconnect(int, const char *);
4949
boolECPGprepare(int,char*,char*);
5050
boolECPGdeallocate(int,char*);
5151
boolECPGdeallocate_all(int);
52-
char*ECPGprepared_statement(char*);
52+
char*ECPGprepared_statement(char*);
5353

5454
voidECPGlog(constchar*format,...);
55+
char*ECPGerrmsg(void);
5556

5657
/* print an error message */
5758
voidsqlprint(void);

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

Lines changed: 9 additions & 2 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.105 2003/02/14 16:40:01 meskes Exp $
15+
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.106 2003/02/17 14:06:39 meskes Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -969,7 +969,8 @@ cppline{space}*#(.*\\{space})*.*
969969
yyin =NULL;
970970

971971
/* If file name is enclosed in '"' remove these and look only in '.' */
972-
if (yytext[0] =='"' && yytext[i] =='"')
972+
/* Informix does look into all include paths though, except filename starts with '/' */
973+
if ((yytext[0] =='"' && yytext[i] =='"') && (compat != ECPG_COMPAT_INFORMIX || yytext[0] =='/'))
973974
{
974975
yytext[i] ='\0';
975976
memmove(yytext, yytext+1,strlen(yytext));
@@ -988,6 +989,12 @@ cppline{space}*#(.*\\{space})*.*
988989
}
989990
else
990991
{
992+
if (yytext[0] =='"' && yytext[i] =='"')
993+
{
994+
yytext[i] ='\0';
995+
memmove(yytext, yytext+1,strlen(yytext));
996+
}
997+
991998
for (ip = include_paths; yyin ==NULL && ip !=NULL; ip = ip->next)
992999
{
9931000
if (strlen(ip->path) +strlen(yytext) +3 > MAXPGPATH)

‎src/interfaces/ecpg/preproc/preproc.y

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.208 2003/02/14 13:17:13 meskes Exp $*/
1+
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.209 2003/02/17 14:06:40 meskes Exp $*/
22

33
/* Copyright comment*/
44
%{
@@ -153,7 +153,7 @@ make_name(void)
153153
/* special embedded SQL token*/
154154
%tokenSQL_ALLOCATESQL_AUTOCOMMITSQL_BOOLSQL_BREAK
155155
SQL_CALLSQL_CARDINALITYSQL_CONNECTSQL_CONNECTION
156-
SQL_CONTINUESQL_COUNTSQL_CURRENTSQL_DATA
156+
SQL_CONTINUESQL_COUNTSQL_CURRENTSQL_DATA
157157
SQL_DATETIME_INTERVAL_CODE
158158
SQL_DATETIME_INTERVAL_PRECISION
159159
SQL_DESCRIPTORSQL_DISCONNECTSQL_ENUMSQL_FOUND
@@ -3889,6 +3889,8 @@ ECPGConnect: SQL_CONNECT TO connection_target opt_connection_name opt_user
38893889
/* also allow ORACLE syntax*/
38903890
|SQL_CONNECTora_user
38913891
{$$ = cat_str(3, make_str("NULL,"),$2, make_str(",NULL")); }
3892+
|DATABASEconnection_target
3893+
{$$ = cat2_str($2, make_str(",NULL,NULL,NULL")); }
38923894
;
38933895

38943896
connection_target:database_nameopt_serveropt_port

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp