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
ac3884e2
Commit
ac3884e2
authored
Mar 23, 2000
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
3097788f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
5 deletions
+53
-5
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+4
-0
src/interfaces/ecpg/preproc/keywords.c
src/interfaces/ecpg/preproc/keywords.c
+2
-1
src/interfaces/ecpg/preproc/preproc.y
src/interfaces/ecpg/preproc/preproc.y
+47
-4
No files found.
src/interfaces/ecpg/ChangeLog
View file @
ac3884e2
...
...
@@ -871,5 +871,9 @@ Wed Mar 15 17:36:02 CET 2000
Sun Mar 19 11:03:13 CET 2000
- Fixed quoting bug in disconnect statement.
Thu Mar 23 08:13:39 CET 2000
- Synced preproc.y and keyword.c.
- Set library version to 3.1.0.
- Set ecpg version to 2.7.0.
src/interfaces/ecpg/preproc/keywords.c
View file @
ac3884e2
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.2
4 2000/03/15 19:09:10
meskes Exp $
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.2
5 2000/03/23 07:53:48
meskes Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -48,6 +48,7 @@ static ScanKeyword ScanKeywords[] = {
{
"begin"
,
BEGIN_TRANS
},
{
"between"
,
BETWEEN
},
{
"binary"
,
BINARY
},
{
"bit"
,
BIT
},
{
"both"
,
BOTH
},
{
"by"
,
BY
},
{
"cache"
,
CACHE
},
...
...
src/interfaces/ecpg/preproc/preproc.y
View file @
ac3884e2
...
...
@@ -223,7 +223,7 @@ make_name(void)
* - Todd A. Brandys 1998-01-01?
*/
%token ABORT_TRANS, ACCESS, AFTER, AGGREGATE, ANALYZE,
BACKWARD, BEFORE, BINARY,
BACKWARD, BEFORE, BINARY,
BIT
CACHE, CLUSTER, COMMENT, COPY, CREATEDB, CREATEUSER, CYCLE,
DATABASE, DELIMITERS, DO,
EACH, ENCODING, EXCLUSIVE, EXPLAIN, EXTEND,
...
...
@@ -326,7 +326,7 @@ make_name(void)
%type <str> CreatePLangStmt IntegerOnly TriggerFuncArgs TriggerFuncArg
%type <str> ViewStmt LoadStmt CreatedbStmt createdb_opt_encoding
%type <str> createdb_opt_location opt_encoding AlterTableStmt
%type <str> DropdbStmt ClusterStmt grantee RevokeStmt table_expr
%type <str> DropdbStmt ClusterStmt grantee RevokeStmt table_expr
Bit bit
%type <str> GrantStmt privileges operation_commalist operation
%type <str> opt_cursor opt_lmode ConstraintsSetStmt comment_tg
%type <str> case_expr when_clause_list case_default case_arg when_clause
...
...
@@ -2899,6 +2899,7 @@ Typename: SimpleTypename opt_array_bounds
SimpleTypename: Generic { $$ = $1; }
| Datetime { $$ = $1; }
| Numeric { $$ = $1; }
| Bit { $$ = $1; }
| Character { $$ = $1; }
;
...
...
@@ -3059,6 +3060,35 @@ opt_decimal: '(' Iconst ',' Iconst ')'
}
;
/*
* SQL92 bit-field data types
* The following implements BIT() and BIT VARYING().
*/
Bit: bit '(' Iconst ')'
{
$$ = cat_str(4, $1, make_str("("), $3, make_str(")"));
if (atol($3) < 1)
{
sprintf(errortext,"length for type '%s' must be at least 1",$1);
mmerror(ET_ERROR, errortext);
}
else if (atol($3) > (MaxAttrSize *sizeof(char)))
{
sprintf(errortext, "length for type '%s' cannot exceed %ld", $1,
(MaxAttrSize * sizeof(char)));
}
}
| bit
{
$$ = $1;
}
;
bit: BIT opt_varying
{
$$ = cat2_str(make_str("bit"), $2);
}
/*
* SQL92 character data types
* The following implements CHAR() and VARCHAR().
...
...
@@ -3250,6 +3280,8 @@ a_expr: c_expr
* If you add more explicitly-known operators, be sure to add them
* also to b_expr and to the MathOp list above.
*/
| '+' a_expr %prec UMINUS
{ $$ = cat2_str(make_str("+"), $2); }
| '-' a_expr %prec UMINUS
{ $$ = cat2_str(make_str("-"), $2); }
| '%' a_expr
...
...
@@ -3262,7 +3294,10 @@ a_expr: c_expr
{ $$ = cat2_str(make_str(":"), $2); }
*/
| ';' a_expr
{ $$ = cat2_str(make_str(";"), $2); }
{ $$ = cat2_str(make_str(";"), $2);
mmerror(ET_WARN, "The ';' operator is deprecated. Use ln(x) instead."
"\n\tThis operator will be removed in a future release.");
}
| a_expr '%'
{ $$ = cat2_str($1, make_str("%")); }
| a_expr '^'
...
...
@@ -3380,7 +3415,10 @@ b_expr: c_expr
{ $$ = cat2_str(make_str(":"), $2); }
*/
| ';' b_expr
{ $$ = cat2_str(make_str(";"), $2); }
{ $$ = cat2_str(make_str(";"), $2);
mmerror(ET_WARN, "The ';' operator is deprecated. Use ln(x) instead."
"\n\tThis operator will be removed in a future release.");
}
| b_expr '%'
{ $$ = cat2_str($1, make_str("%")); }
| b_expr '^'
...
...
@@ -3810,6 +3848,8 @@ TypeId: ColId
{ $$ = $1; }
| numeric
{ $$ = $1; }
| bit
{ $$ = $1; }
| character
{ $$ = $1; }
;
...
...
@@ -4884,6 +4924,7 @@ ECPGColId: /* to be used instead of ColId */
| EACH { $$ = make_str("each"); }
| ENCODING { $$ = make_str("encoding"); }
| EXCLUSIVE { $$ = make_str("exclusive"); }
| FORCE { $$ = make_str("force"); }
| FORWARD { $$ = make_str("forward"); }
| FUNCTION { $$ = make_str("function"); }
| HANDLER { $$ = make_str("handler"); }
...
...
@@ -4957,7 +4998,9 @@ ECPGColLabel: ECPGColId { $$ = $1; }
| ABORT_TRANS { $$ = make_str("abort"); }
| ANALYZE { $$ = make_str("analyze"); }
| BINARY { $$ = make_str("binary"); }
| BIT { $$ = make_str("bit"); }
| CASE { $$ = make_str("case"); }
| CHARACTER { $$ = make_str("character"); }
| CLUSTER { $$ = make_str("cluster"); }
| COALESCE { $$ = make_str("coalesce"); }
| CONSTRAINT { $$ = make_str("constraint"); }
...
...
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