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
1ebc028c
Commit
1ebc028c
authored
Oct 14, 2001
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fixed GRANT statement.
- Synced preproc.y with gram.y.
parent
e482dcb0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
43 deletions
+41
-43
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+9
-5
src/interfaces/ecpg/preproc/preproc.y
src/interfaces/ecpg/preproc/preproc.y
+32
-38
No files found.
src/interfaces/ecpg/ChangeLog
View file @
1ebc028c
...
...
@@ -1102,28 +1102,32 @@ Tue Sep 25 20:10:03 CEST 2001
- Synced preproc.y with gram.y.
- Changed locale handling.
Mon O
k
t 1 13:49:40 CEST 2001
Mon O
c
t 1 13:49:40 CEST 2001
- Fixed truncate bug.
- Added patch by Christof Petig <christof.petig@wtal.de> to clean up
ecpglib.
TUe O
k
t 2 16:09:26 CEST 2001
TUe O
c
t 2 16:09:26 CEST 2001
- Re-added Tom's patch fixing my setlocale patch. I accidently
deleted it.
Fri O
k
t 5 08:37:01 CEST 2001
Fri O
c
t 5 08:37:01 CEST 2001
- Fixed yet another typo in preproc.y.
Fri O
k
t 5 19:33:46 CEST 2001
Fri O
c
t 5 19:33:46 CEST 2001
- Make sure every call to ECPGraise is logged.
Mon O
k
t 8 10:10:23 CEST 2001
Mon O
c
t 8 10:10:23 CEST 2001
- Fix include file so library is binary compatible again.
Sun Oct 14 14:07:59 CEST 2001
- Fixed GRANT statement.
- Synced preproc.y with gram.y.
- Set ecpg version to 2.9.0.
- Set library version to 3.3.0.
src/interfaces/ecpg/preproc/preproc.y
View file @
1ebc028c
...
...
@@ -192,8 +192,8 @@ make_name(void)
PARTIAL, PATH_P, POSITION, PRECISION, PRIMARY, PRIOR, PRIVILEGES, PROCEDURE, PUBLIC,
READ, REFERENCES, RELATIVE, REVOKE, RIGHT, ROLLBACK,
SCHEMA, SCROLL, SECOND_P, SELECT, SESSION, SESSION_USER, SET, SOME, SUBSTRING,
TABLE, TEMPORARY, THEN, TIME, TIMESTAMP
, TIMEZONE_HOUR,
T
IMEZONE_MINUTE, T
O, TRAILING, TRANSACTION, TRIM, TRUE_P,
TABLE, TEMPORARY, THEN, TIME, TIMESTAMP
TO, TRAILING, TRANSACTION, TRIM, TRUE_P,
UNENCRYPTED, UNION, UNIQUE, UNKNOWN, UPDATE, USER, USING,
VALUES, VARCHAR, VARYING, VIEW,
WHEN, WHERE, WITH, WITHOUT, WORK, YEAR_P, ZONE
...
...
@@ -335,7 +335,7 @@ make_name(void)
%type <str> opt_level opt_lock lock_type OptGroupList OptGroupElem
%type <str> OptConstrFromTable OptTempTableName StringConst
%type <str> constraints_set_list constraints_set_namelist
%type <str> constraints_set_mode comment_type
%type <str> constraints_set_mode comment_type
opt_empty_parentheses
%type <str> CreateGroupStmt AlterGroupStmt DropGroupStmt key_delete
%type <str> opt_force key_update CreateSchemaStmt PosIntStringConst
%type <str> IntConst PosIntConst grantee_list func_type opt_or_replace
...
...
@@ -1693,7 +1693,7 @@ comment_text: StringConst { $$ = $1; }
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);
$$ = cat_str(
7
, make_str("grant"), $2, make_str("on"), $4, $5, make_str("to"), $7);
}
;
...
...
@@ -3064,19 +3064,19 @@ bit: BIT opt_varying
* The following implements CHAR() and VARCHAR().
* - ay 6/95
*/
Character: character '(' PosIntConst ')'
Character: character '(' PosIntConst ')'
opt_charset
{
$$ = cat_str(
4, $1, make_str("("), $3, make_str(")")
);
$$ = cat_str(
5, $1, make_str("("), $3, make_str(")"), $5
);
}
| character
| character
opt_charset
{
$$ =
$1
;
$$ =
cat2_str($1, $2)
;
}
;
character: CHARACTER opt_varying
opt_charset
character: CHARACTER opt_varying
{
$$ = cat
_str(3, make_str("character"), $2, $3
);
$$ = cat
2_str(make_str("character"), $2
);
}
| CHAR opt_varying { $$ = cat2_str(make_str("char"), $2); }
| VARCHAR { $$ = make_str("varchar"); }
...
...
@@ -3101,10 +3101,18 @@ ConstDatetime: datetime
{
$$ = $1;
}
| TIMESTAMP '(' PosIntConst ')' opt_timezone
{
$$ = cat_str(4, make_str("timestamp("), $3, make_str(")"), $5);
}
| TIMESTAMP opt_timezone
{
$$ = cat2_str(make_str("timestamp"), $2);
}
| TIME '(' PosIntConst ')' opt_timezone
{
$$ = cat_str(4, make_str("time("), $3, make_str(")"), $5);
}
| TIME opt_timezone
{
$$ = cat2_str(make_str("time"), $2);
...
...
@@ -3439,36 +3447,24 @@ c_expr: attr
{ $$ = cat2_str($1, make_str("(*)")); }
| CURRENT_DATE
{ $$ = make_str("current_date"); }
| CURRENT_TIME
{ $$ =
make_str("current_time"
); }
| CURRENT_TIME
opt_empty_parentheses
{ $$ =
cat2_str(make_str("current_time"), $2
); }
| CURRENT_TIME '(' PosIntConst ')'
{
if (atol($3) != 0)
{
sprintf(errortext, "CURRENT_TIME(%s) precision not implemented; backend will use zero instead", $3);
mmerror(ET_NOTICE, errortext);
}
$$ = make_str("current_time");
}
| CURRENT_TIMESTAMP
{ $$ =
make_str("current_timestamp"
); }
| CURRENT_TIMESTAMP
opt_empty_parentheses
{ $$ =
cat2_str(make_str("current_timestamp"), $2
); }
| CURRENT_TIMESTAMP '(' PosIntConst ')'
{
if (atol($3) != 0)
{
sprintf(errortext, "CURRENT_TIMESTAMP(%s) precision not implemented; backend will use zero instead", $3);
mmerror(ET_NOTICE, errortext);
}
$$ = make_str("current_timestamp");
}
| CURRENT_USER
{ $$ =
make_str("current_user"
); }
| SESSION_USER
{ $$ =
make_str("session_user"
); }
| USER
{ $$ =
make_str("user"
); }
| CURRENT_USER
opt_empty_parentheses
{ $$ =
cat2_str(make_str("current_user"), $2
); }
| SESSION_USER
opt_empty_parentheses
{ $$ =
cat2_str(make_str("session_user"), $2
); }
| USER
opt_empty_parentheses
{ $$ =
cat2_str(make_str("user"), $2
); }
| EXTRACT '(' extract_list ')'
{ $$ = cat_str(3, make_str("extract("), $3, make_str(")")); }
| POSITION '(' position_list ')'
...
...
@@ -3528,8 +3524,6 @@ extract_list: extract_arg FROM a_expr
extract_arg: datetime { $$ = $1; }
| SCONST { $$ = $1; }
| IDENT { $$ = $1; }
| TIMEZONE_HOUR { $$ = make_str("timezone_hour"); }
| TIMEZONE_MINUTE { $$ = make_str("timezone_minute"); }
;
/* position_list uses b_expr not a_expr to avoid conflict with general IN */
...
...
@@ -3663,6 +3657,8 @@ attrs: attr_name
{ $$ = make2_str($1, make_str(".*")); }
;
opt_empty_parentheses: '(' ')' { $$ = make_str("()"); }
| /*EMPTY*/ { $$ = EMPTY; }
/*****************************************************************************
*
...
...
@@ -5063,8 +5059,6 @@ TokenId: ABSOLUTE { $$ = make_str("absolute"); }
| TEMP { $$ = make_str("temp"); }
| TEMPLATE { $$ = make_str("template"); }
| TEMPORARY { $$ = make_str("temporary"); }
| TIMEZONE_HOUR { $$ = make_str("timezone_hour"); }
| TIMEZONE_MINUTE { $$ = make_str("timezone_minute"); }
| TOAST { $$ = make_str("toast"); }
| TRIGGER { $$ = make_str("trigger"); }
| TRUNCATE { $$ = make_str("truncate"); }
...
...
@@ -5092,8 +5086,6 @@ ECPGColId: ident { $$ = $1; }
| NATIONAL { $$ = make_str("national"); }
| NONE { $$ = make_str("none"); }
| PATH_P { $$ = make_str("path_p"); }
| TIME { $$ = make_str("time"); }
| TIMESTAMP { $$ = make_str("timestamp"); }
| ECPGKeywords { $$ = $1; }
;
...
...
@@ -5195,6 +5187,8 @@ ECPGColLabel: ECPGColId { $$ = $1; }
| SUBSTRING { $$ = make_str("substring"); }
| TABLE { $$ = make_str("table"); }
| THEN { $$ = make_str("then"); }
| TIME { $$ = make_str("time"); }
| TIMESTAMP { $$ = make_str("timestamp"); }
| TO { $$ = make_str("to"); }
| TRANSACTION { $$ = make_str("transaction"); }
| TRIM { $$ = make_str("trim"); }
...
...
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