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
cee82fab
Commit
cee82fab
authored
Jun 13, 2001
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Synced preproc.y with gram.y.
- Applied bug fix by John Summerfield.
parent
2938eec7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
16 deletions
+43
-16
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+5
-0
src/interfaces/ecpg/preproc/pgc.l
src/interfaces/ecpg/preproc/pgc.l
+2
-2
src/interfaces/ecpg/preproc/preproc.y
src/interfaces/ecpg/preproc/preproc.y
+36
-14
No files found.
src/interfaces/ecpg/ChangeLog
View file @
cee82fab
...
...
@@ -1079,5 +1079,10 @@ Fri Jun 1 08:13:25 CEST 2001
- Synced preproc.y with gram.y.
- Synced pgc.l with scan.l.
- Synced keyword.c.
Wed Jun 13 14:39:12 CEST 2001
- Synced preproc.y with gram.y.
- Applied bug fix by John Summerfield.
- Set ecpg version to 2.9.0.
- Set library version to 3.3.0.
src/interfaces/ecpg/preproc/pgc.l
View file @
cee82fab
...
...
@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.7
8 2001/04/02 08:17:24
meskes Exp $
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.7
9 2001/06/13 12:38:58
meskes Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -896,7 +896,7 @@ lex_init(void)
braces_open = 0;
preproc_tos = 0;
yylineno =
0
;
yylineno =
1
;
ifcond = TRUE;
stacked_if_value[preproc_tos].condition = ifcond;
stacked_if_value[preproc_tos].else_branch = FALSE;
...
...
src/interfaces/ecpg/preproc/preproc.y
View file @
cee82fab
...
...
@@ -337,7 +337,7 @@ make_name(void)
%type <str> constraints_set_mode comment_type comment_cl comment_ag
%type <str> CreateGroupStmt AlterGroupStmt DropGroupStmt key_delete
%type <str> opt_force key_update CreateSchemaStmt PosIntStringConst
%type <str> IntConst PosIntConst
%type <str> IntConst PosIntConst
grantee_list func_type
%type <str> select_limit opt_for_update_clause CheckPointStmt
%type <str> ECPGWhenever ECPGConnect connection_target ECPGOpen
...
...
@@ -852,6 +852,10 @@ VariableShowStmt: SHOW ColId
{
$$ = make_str("show time zone");
}
| SHOW ALL
{
$$ = make_str("show all");
}
| SHOW TRANSACTION ISOLATION LEVEL
{
$$ = make_str("show transaction isolation level");
...
...
@@ -870,6 +874,10 @@ VariableResetStmt: RESET ColId
{
$$ = make_str("reset transaction isolation level");
}
| RESET ALL
{
$$ = make_str("reset all");
}
;
ConstraintsSetStmt: SET CONSTRAINTS constraints_set_list constraints_set_mode
...
...
@@ -1681,11 +1689,11 @@ comment_text: StringConst { $$ = $1; }
/*****************************************************************************
*
* QUERY:
*
GRANT [privileges] ON [relation_name_list] TO [GROUP] grantee
*
GRANT [privileges] ON [TABLE] relation_name_list TO [GROUP] grantee, ...
*
*****************************************************************************/
GrantStmt: GRANT privileges ON opt_table relation_name_list TO grantee opt_with_grant
GrantStmt: GRANT privileges ON opt_table relation_name_list TO grantee
_list
opt_with_grant
{
$$ = cat_str(8, make_str("grant"), $2, make_str("on"), $4, $5, make_str("to"), $7);
}
...
...
@@ -1759,6 +1767,10 @@ grantee: PUBLIC
}
;
grantee_list: grantee { $$ = $1; }
| grantee_list ',' grantee { $$ = cat_str(3, $1, make_str(","), $3); }
;
opt_with_grant: WITH GRANT OPTION
{
mmerror(ET_ERROR, "WITH GRANT OPTION is not supported. Only relation owners can set privileges");
...
...
@@ -1770,11 +1782,11 @@ opt_with_grant: WITH GRANT OPTION
/*****************************************************************************
*
* QUERY:
*
REVOKE [privileges] ON [relation_name] FROM [user]
*
REVOKE privileges ON [TABLE relation_name_list FROM [user], ...
*
*****************************************************************************/
RevokeStmt: REVOKE privileges ON opt_table relation_name_list FROM grantee
RevokeStmt: REVOKE privileges ON opt_table relation_name_list FROM grantee
_list
{
$$ = cat_str(8, make_str("revoke"), $2, make_str("on"), $4, $5, make_str("from"), $7);
}
...
...
@@ -1914,7 +1926,7 @@ func_args_list: func_arg { $$ = $1; }
{ $$ = cat_str(3, $1, make_str(","), $3); }
;
func_arg: opt_arg
Typenam
e
func_arg: opt_arg
func_typ
e
{
/* We can catch over-specified arguments here if we want to,
* but for now better to silently swallow typmod, etc.
...
...
@@ -1922,7 +1934,7 @@ func_arg: opt_arg Typename
*/
$$ = cat2_str($1, $2);
}
|
Typename
|
func_type
{
$$ = $1;
}
...
...
@@ -1944,7 +1956,7 @@ opt_arg: IN { $$ = make_str("in"); }
func_as: StringConst { $$ = $1; }
| StringConst ',' StringConst { $$ = cat_str(3, $1, make_str(","), $3); }
func_return:
Typenam
e
func_return:
func_typ
e
{
/* We can catch over-specified arguments here if we want to,
* but for now better to silently swallow typmod, etc.
...
...
@@ -1954,6 +1966,16 @@ func_return: Typename
}
;
func_type: Typename
{
$$ = $1;
}
| IDENT '.' ColId '%' TYPE_P
{
$$ = cat_str(4, $1, make_str("."), $3, make_str("% type"));
}
;
/*****************************************************************************
*
* QUERY:
...
...
@@ -3869,7 +3891,7 @@ connection_target: database_name opt_server opt_port
/* old style: dbname[@server][:port] */
if (strlen($2) > 0 && *($2) != '@')
{
sprintf(errortext, "
parse error at or near
'%s'", $2);
sprintf(errortext, "
Expected '@', found
'%s'", $2);
mmerror(ET_ERROR, errortext);
}
...
...
@@ -3880,7 +3902,7 @@ connection_target: database_name opt_server opt_port
/* new style: <tcp|unix>:postgresql://server[:port][/dbname] */
if (strncmp($3, "//", strlen("//")) != 0)
{
sprintf(errortext, "
parse error at or near
'%s'", $3);
sprintf(errortext, "
Expected '://', found
'%s'", $3);
mmerror(ET_ERROR, errortext);
}
...
...
@@ -3926,7 +3948,7 @@ db_prefix: ident cvariable
{
if (strcmp($2, "postgresql") != 0 && strcmp($2, "postgres") != 0)
{
sprintf(errortext, "
parse error at or near
'%s'", $2);
sprintf(errortext, "
Expected 'postgresql', found
'%s'", $2);
mmerror(ET_ERROR, errortext);
}
...
...
@@ -3943,7 +3965,7 @@ server: Op server_name
{
if (strcmp($1, "@") != 0 && strcmp($1, "//") != 0)
{
sprintf(errortext, "
parse error at or near
'%s'", $1);
sprintf(errortext, "
Expected '@' or '://', found
'%s'", $1);
mmerror(ET_ERROR, errortext);
}
...
...
@@ -4037,11 +4059,11 @@ char_variable: cvariable
opt_options: Op ColId
{
if (strlen($1) == 0)
mmerror(ET_ERROR, "
parse error
");
mmerror(ET_ERROR, "
incomplete statement
");
if (strcmp($1, "?") != 0)
{
sprintf(errortext, "
parse error at or near %s
", $1);
sprintf(errortext, "
unrecognised token '%s'
", $1);
mmerror(ET_ERROR, errortext);
}
...
...
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