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
a7b06f20
Commit
a7b06f20
authored
May 21, 1999
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
96492290
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
25 deletions
+17
-25
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+4
-0
src/interfaces/ecpg/preproc/preproc.y
src/interfaces/ecpg/preproc/preproc.y
+13
-25
No files found.
src/interfaces/ecpg/ChangeLog
View file @
a7b06f20
...
...
@@ -582,5 +582,9 @@ Thu May 13 13:51:26 CEST 1999
Mon May 17 18:13:30 CEST 1999
- Synced preproc.y with gram.y.
Fri May 21 18:13:44 CEST 1999
- Synced preproc.y with gram.y.
- Set library version to 3.0.0
- Set ecpg version to 2.6.0
src/interfaces/ecpg/preproc/preproc.y
View file @
a7b06f20
...
...
@@ -814,7 +814,7 @@ adjust_array(enum ECPGttype type_enum, int *dimension, int *length, int type_dim
%type <str> ViewStmt LoadStmt CreatedbStmt opt_database1 opt_database2 location
%type <str> DestroydbStmt ClusterStmt grantee RevokeStmt encoding
%type <str> GrantStmt privileges operation_commalist operation
%type <str>
cursor_clause opt_cursor opt_readonly opt_of
opt_lmode
%type <str>
opt_cursor
opt_lmode
%type <str> case_expr when_clause_list case_default case_arg when_clause
%type <str> select_clause opt_select_limit select_limit_value
%type <str> select_offset_value table_list using_expr join_expr
...
...
@@ -2724,7 +2724,9 @@ UpdateStmt: UPDATE relation_name
* CURSOR STATEMENTS
*
*****************************************************************************/
CursorStmt: DECLARE name opt_cursor CURSOR FOR SelectStmt cursor_clause
CursorStmt: DECLARE name opt_cursor CURSOR FOR
{ ForUpdateNotAllowed = 1; }
SelectStmt
{
struct cursor *ptr, *this;
...
...
@@ -2744,7 +2746,7 @@ CursorStmt: DECLARE name opt_cursor CURSOR FOR SelectStmt cursor_clause
this->next = cur;
this->name = $2;
this->connection = connection;
this->command = cat
2_str(cat5_str(make1_str("declare"), mm_strdup($2), $3, make1_str("cursor for"), $6
), $7);
this->command = cat
5_str(make1_str("declare"), mm_strdup($2), $3, make1_str("cursor for"
), $7);
this->argsinsert = argsinsert;
this->argsresult = argsresult;
argsinsert = argsresult = NULL;
...
...
@@ -2762,20 +2764,6 @@ opt_cursor: BINARY { $$ = make1_str("binary"); }
| /*EMPTY*/ { $$ = make1_str(""); }
;
cursor_clause: FOR opt_readonly { $$ = cat2_str(make1_str("for"), $2); }
| /*EMPTY*/ { $$ = make1_str(""); }
;
opt_readonly: READ ONLY { $$ = make1_str("read only"); }
| UPDATE opt_of
{
yyerror("DECLARE/UPDATE not supported; Cursors must be READ ONLY.");
}
;
opt_of: OF columnList { $$ = make2_str(make1_str("of"), $2); }
/*****************************************************************************
*
* QUERY:
...
...
@@ -2793,7 +2781,7 @@ opt_of: OF columnList { $$ = make2_str(make1_str("of"), $2); }
SelectStmt: select_clause sort_clause for_update_clause opt_select_limit
{
if (strlen($3) > 0 && ForUpdateNotAllowed != 0)
yyerror("
SELECT
FOR UPDATE is not allowed in this context");
yyerror("FOR UPDATE is not allowed in this context");
ForUpdateNotAllowed = 0;
$$ = cat4_str($1, $2, $3, $4);
...
...
@@ -2941,6 +2929,10 @@ for_update_clause: FOR UPDATE update_list
{
$$ = make1_str("for update");
}
| FOR READ ONLY
{
$$ = make1_str("for read only");
}
| /* EMPTY */
{
$$ = make1_str("");
...
...
@@ -3356,11 +3348,7 @@ Character: character '(' Iconst ')'
yyerror(errortext);
}
else if (atol($3) > BLCKSZ - 128) {
/* we can store a char() of length up to the size
* of a page (8KB) - page headers and friends but
* just to be safe here... - ay 6/95
*/
sprintf(errortext, "length for type '%s' cannot exceed %d",BLCKSZ-128);
sprintf(errortext, "length for type '%s' cannot exceed %d",$1,BLCKSZ - 128);
yyerror(errortext);
}
...
...
@@ -4721,7 +4709,7 @@ opt_options: Op ColId
* Declare a prepared cursor. The syntax is different from the standard
* declare statement, so we create a new rule.
*/
ECPGCursorStmt: DECLARE name opt_cursor CURSOR FOR ident
cursor_clause
ECPGCursorStmt: DECLARE name opt_cursor CURSOR FOR ident
{
struct cursor *ptr, *this;
struct variable *thisquery = (struct variable *)mm_alloc(sizeof(struct variable));
...
...
@@ -4742,7 +4730,7 @@ ECPGCursorStmt: DECLARE name opt_cursor CURSOR FOR ident cursor_clause
this->next = cur;
this->name = $2;
this->connection = connection;
this->command = cat
5_str(make1_str("declare"), mm_strdup($2), $3, make1_str("cursor for ?"), $7
);
this->command = cat
4_str(make1_str("declare"), mm_strdup($2), $3, make1_str("cursor for ?")
);
this->argsresult = NULL;
thisquery->type = &ecpg_query;
...
...
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