Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
b4c8d47a
Commit
b4c8d47a
authored
Sep 21, 2000
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
eab8ee95
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
8 deletions
+22
-8
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+4
-0
src/interfaces/ecpg/lib/execute.c
src/interfaces/ecpg/lib/execute.c
+2
-2
src/interfaces/ecpg/preproc/pgc.l
src/interfaces/ecpg/preproc/pgc.l
+7
-1
src/interfaces/ecpg/preproc/preproc.y
src/interfaces/ecpg/preproc/preproc.y
+7
-4
src/interfaces/ecpg/test/test2.pgc
src/interfaces/ecpg/test/test2.pgc
+2
-1
No files found.
src/interfaces/ecpg/ChangeLog
View file @
b4c8d47a
...
@@ -940,5 +940,9 @@ Mit Sep 20 12:40:27 PDT 2000
...
@@ -940,5 +940,9 @@ Mit Sep 20 12:40:27 PDT 2000
backend NOTICEs.
backend NOTICEs.
- Added patch by Christof Petig <christof.petig@wtal.de> to cache
- Added patch by Christof Petig <christof.petig@wtal.de> to cache
type information.
type information.
Don Sep 21 13:54:13 PDT 2000
- Enabled parser to accept ip addresses instead of host names.
- Set ecpg version to 2.8.0.
- Set ecpg version to 2.8.0.
- Set library version to 3.2.0.
- Set library version to 3.2.0.
src/interfaces/ecpg/lib/execute.c
View file @
b4c8d47a
...
@@ -262,7 +262,7 @@ static void
...
@@ -262,7 +262,7 @@ static void
ECPGtypeinfocache_push
(
struct
ECPGtype_information_cache
**
cache
,
int
oid
,
bool
isarray
,
int
lineno
)
ECPGtypeinfocache_push
(
struct
ECPGtype_information_cache
**
cache
,
int
oid
,
bool
isarray
,
int
lineno
)
{
{
struct
ECPGtype_information_cache
*
new_entry
struct
ECPGtype_information_cache
*
new_entry
=
ecpg_alloc
(
sizeof
(
struct
ECPGtype_information_cache
),
lineno
);
=
(
struct
ECPGtype_information_cache
*
)
ecpg_alloc
(
sizeof
(
struct
ECPGtype_information_cache
),
lineno
);
new_entry
->
oid
=
oid
;
new_entry
->
oid
=
oid
;
new_entry
->
isarray
=
isarray
;
new_entry
->
isarray
=
isarray
;
new_entry
->
next
=
*
cache
;
new_entry
->
next
=
*
cache
;
...
@@ -989,7 +989,7 @@ ECPGdo(int lineno, const char *connection_name, char *query,...)
...
@@ -989,7 +989,7 @@ ECPGdo(int lineno, const char *connection_name, char *query,...)
*
*
* Copyright (c) 2000, Christof Petig <christof.petig@wtal.de>
* Copyright (c) 2000, Christof Petig <christof.petig@wtal.de>
*
*
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/execute.c,v 1.
9 2000/09/20 13:25:51
meskes Exp $
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/execute.c,v 1.
10 2000/09/21 11:56:07
meskes Exp $
*/
*/
PGconn
*
ECPG_internal_get_connection
(
char
*
name
);
PGconn
*
ECPG_internal_get_connection
(
char
*
name
);
...
...
src/interfaces/ecpg/preproc/pgc.l
View file @
b4c8d47a
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.6
1 2000/09/19 11:47:14
meskes Exp $
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.6
2 2000/09/21 11:56:07
meskes Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -260,6 +260,8 @@ elif [eE][lL][iI][fF]
...
@@ -260,6 +260,8 @@ elif [eE][lL][iI][fF]
endif [eE][nN][dD][iI][fF]
endif [eE][nN][dD][iI][fF]
exec_sql {exec}{space_or_nl}*{sql}{space_or_nl}*
exec_sql {exec}{space_or_nl}*{sql}{space_or_nl}*
ipdigit ({digit}|{digit}{digit}|{digit}{digit}{digit})
ip {ipdigit}\.{ipdigit}\.{ipdigit}\.{ipdigit}
/* Take care of cpp continuation lines */
/* Take care of cpp continuation lines */
cppline {space}*#(.*\\{line_end})*.*
cppline {space}*#(.*\\{line_end})*.*
...
@@ -516,6 +518,10 @@ cppline {space}*#(.*\\{line_end})*.*
...
@@ -516,6 +518,10 @@ cppline {space}*#(.*\\{line_end})*.*
}
}
return ICONST;
return ICONST;
}
}
<SQL>{ip} {
yylval.str = mm_strdup((char*)yytext);
return IP;
}
{decimal} {
{decimal} {
yylval.str = mm_strdup((char*)yytext);
yylval.str = mm_strdup((char*)yytext);
return FCONST;
return FCONST;
...
...
src/interfaces/ecpg/preproc/preproc.y
View file @
b4c8d47a
...
@@ -239,7 +239,7 @@ make_name(void)
...
@@ -239,7 +239,7 @@ make_name(void)
VALID, VERBOSE, VERSION
VALID, VERBOSE, VERSION
/* Special keywords, not in the query language - see the "lex" file */
/* Special keywords, not in the query language - see the "lex" file */
%token <str> IDENT SCONST Op CSTRING CVARIABLE CPP_LINE
%token <str> IDENT SCONST Op CSTRING CVARIABLE CPP_LINE
IP
%token <ival> ICONST PARAM
%token <ival> ICONST PARAM
%token <dval> FCONST
%token <dval> FCONST
...
@@ -4029,9 +4029,11 @@ connection_target: database_name opt_server opt_port
...
@@ -4029,9 +4029,11 @@ connection_target: database_name opt_server opt_port
mmerror(ET_ERROR, errortext);
mmerror(ET_ERROR, errortext);
}
}
if (strncmp($1, "unix", strlen("unix")) == 0 && strncmp($3 + strlen("//"), "localhost", strlen("localhost")) != 0)
if (strncmp($1, "unix", strlen("unix")) == 0 &&
strncmp($3 + strlen("//"), "localhost", strlen("localhost")) != 0 &&
strncmp($3 + strlen("//"), "127.0.0.1", strlen("127.0.0.1")) != 0)
{
{
sprintf(errortext, "unix domain sockets only work on 'localhost' but not on '%9.9s'", $3 +strlen("//"));
sprintf(errortext, "unix domain sockets only work on 'localhost' but not on '%9.9s'", $3 +
strlen("//"));
mmerror(ET_ERROR, errortext);
mmerror(ET_ERROR, errortext);
}
}
...
@@ -4088,6 +4090,7 @@ opt_server: server { $$ = $1; }
...
@@ -4088,6 +4090,7 @@ opt_server: server { $$ = $1; }
server_name: ColId { $$ = $1; }
server_name: ColId { $$ = $1; }
| ColId '.' server_name { $$ = make3_str($1, make_str("."), $3); }
| ColId '.' server_name { $$ = make3_str($1, make_str("."), $3); }
| IP { $$ = make_name(); }
opt_port: ':' Iconst { $$ = make2_str(make_str(":"), $2); }
opt_port: ':' Iconst { $$ = make2_str(make_str(":"), $2); }
| /* empty */ { $$ = EMPTY; }
| /* empty */ { $$ = EMPTY; }
...
...
src/interfaces/ecpg/test/test2.pgc
View file @
b4c8d47a
...
@@ -42,7 +42,7 @@ exec sql end declare section;
...
@@ -42,7 +42,7 @@ exec sql end declare section;
ECPGdebug(1, dbgs);
ECPGdebug(1, dbgs);
strcpy(msg, "connect");
strcpy(msg, "connect");
exec sql connect to unix:postgresql://
localhost
:5432/mm;
exec sql connect to unix:postgresql://
127.0.0.1
:5432/mm;
strcpy(msg, "create");
strcpy(msg, "create");
exec sql create table meskes(name char(8), born integer, age smallint, married date, children integer);
exec sql create table meskes(name char(8), born integer, age smallint, married date, children integer);
...
@@ -124,5 +124,6 @@ exec sql end declare section;
...
@@ -124,5 +124,6 @@ exec sql end declare section;
if (dbgs != NULL)
if (dbgs != NULL)
fclose(dbgs);
fclose(dbgs);
return (0);
return (0);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment