Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite514740

Browse files
author
Michael Meskes
committed
Synced parser and keyword list.
1 parenta9545b3 commite514740

File tree

4 files changed

+23
-12
lines changed

4 files changed

+23
-12
lines changed

‎src/interfaces/ecpg/ChangeLog

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2169,7 +2169,6 @@ Fr Feb 2 09:53:48 CET 2007
21692169
Su Feb 11 16:09:31 CET 2007
21702170

21712171
- Fixed multibyte handling as reported by <harada.toshi@oss.ntt.co.jp>.
2172-
- Set ecpg library version to 5.3.
21732172

21742173
Th Mar 15 08:27:53 CET 2007
21752174

@@ -2208,4 +2207,9 @@ Mon, 11 Jun 2007 13:59:57 +0200
22082207

22092208
- Fixed memory leak in descriptor code.
22102209
- Made ecpg delete output file in case of an error.
2210+
2211+
Tue, 12 Jun 2007 09:46:03 +0200
2212+
2213+
- Synced parser and keyword list.
2214+
- Set ecpg library version to 5.3.
22112215
- Set ecpg version to 4.3.1.

‎src/interfaces/ecpg/preproc/ecpg_keywords.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* lexical token lookup for reserved words in postgres embedded SQL
55
*
66
* IDENTIFICATION
7-
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg_keywords.c,v 1.34 2007/05/10 09:53:16 meskes Exp $
7+
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg_keywords.c,v 1.35 2007/06/12 07:55:56 meskes Exp $
88
*
99
*-------------------------------------------------------------------------
1010
*/
@@ -33,7 +33,6 @@ static ScanKeyword ScanKeywords[] = {
3333
{"connect",SQL_CONNECT},
3434
{"continue",SQL_CONTINUE},
3535
{"count",SQL_COUNT},
36-
{"current",SQL_CURRENT},
3736
{"data",SQL_DATA},
3837
{"datetime_interval_code",SQL_DATETIME_INTERVAL_CODE},
3938
{"datetime_interval_precision",SQL_DATETIME_INTERVAL_PRECISION},

‎src/interfaces/ecpg/preproc/keywords.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.79 2007/05/10 09:53:16 meskes Exp $
11+
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.80 2007/06/12 07:55:56 meskes Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -99,6 +99,7 @@ static ScanKeyword ScanKeywords[] = {
9999
{"createuser",CREATEUSER},
100100
{"cross",CROSS},
101101
{"csv",CSV},
102+
{"current",CURRENT_P},
102103
{"current_date",CURRENT_DATE},
103104
{"current_role",CURRENT_ROLE},
104105
{"current_time",CURRENT_TIME},

‎src/interfaces/ecpg/preproc/preproc.y

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.345 2007/06/11 12:01:23 meskes Exp $*/
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.346 2007/06/12 07:55:56 meskes Exp $*/
22

33
/* Copyright comment*/
44
%{
@@ -351,7 +351,7 @@ add_additional_variables(char *name, bool insert)
351351
/* special embedded SQL token*/
352352
%tokenSQL_ALLOCATESQL_AUTOCOMMITSQL_BOOLSQL_BREAK
353353
SQL_CALLSQL_CARDINALITYSQL_CONNECT
354-
SQL_CONTINUESQL_COUNTSQL_CURRENTSQL_DATA
354+
SQL_CONTINUESQL_COUNTSQL_DATA
355355
SQL_DATETIME_INTERVAL_CODE
356356
SQL_DATETIME_INTERVAL_PRECISIONSQL_DESCRIBE
357357
SQL_DESCRIPTORSQL_DISCONNECTSQL_FOUND
@@ -387,8 +387,8 @@ add_additional_variables(char *name, bool insert)
387387
CLUSTER COALESCE COLLATE COLUMN COMMENT COMMIT
388388
COMMITTED CONCURRENTLY CONNECTION CONSTRAINT CONSTRAINTS
389389
CONTENT_P CONVERSION_P CONVERT COPY COST CREATE CREATEDB
390-
CREATEROLE CREATEUSER CROSS CSV CURRENT_DATE CURRENT_ROLE CURRENT_TIME
391-
CURRENT_TIMESTAMP CURRENT_USER CURSOR CYCLE
390+
CREATEROLE CREATEUSER CROSS CSVCURRENT_PCURRENT_DATE CURRENT_ROLE
391+
CURRENT_TIMECURRENT_TIMESTAMP CURRENT_USER CURSOR CYCLE
392392

393393
DATABASE DAY_P DEALLOCATE DEC DECIMAL_P DECLARE DEFAULT DEFAULTS
394394
DEFERRABLE DEFERRED DEFINER DELETE_P DELIMITER DELIMITERS
@@ -576,7 +576,7 @@ add_additional_variables(char *name, bool insert)
576576
%type<str>select_limitCheckPointStmtECPGColIdold_aggr_list
577577
%type<str>OptSchemaNameOptSchemaEltListschema_stmtopt_drop_behavior
578578
%type<str>handler_nameany_name_listany_nameopt_asinsert_column_list
579-
%type<str>columnrefvalues_clauseAllConstVar
579+
%type<str>columnrefvalues_clauseAllConstVarwhere_or_current_clause
580580
%type<str>insert_column_itemDropRuleStmtctext_expr
581581
%type<str>createfunc_opt_itemset_restvar_list_or_defaultalter_rel_cmd
582582
%type<str>CreateFunctionStmtcreatefunc_opt_listfunc_table
@@ -3274,7 +3274,7 @@ returning_clause: RETURNING target_list{ $$ = cat2_str(make_str("returning"),
32743274
*
32753275
*****************************************************************************/
32763276

3277-
DeleteStmt:DELETE_PFROMrelation_expr_opt_aliasusing_clausewhere_clausereturning_clause
3277+
DeleteStmt:DELETE_PFROMrelation_expr_opt_aliasusing_clausewhere_or_current_clausereturning_clause
32783278
{$$ = cat_str(5, make_str("delete from"),$3,$4,$5,$6); }
32793279
;
32803280

@@ -3316,7 +3316,7 @@ opt_nowait: NOWAIT { $$ = make_str("nowait"); }
33163316
UpdateStmt:UPDATErelation_expr_opt_alias
33173317
SETset_clause_list
33183318
from_clause
3319-
where_clause
3319+
where_or_current_clause
33203320
returning_clause
33213321
{$$ = cat_str(7, make_str("update"),$2, make_str("set"),$4,$5,$6,$7); }
33223322
;
@@ -3729,6 +3729,12 @@ where_clause: WHERE a_expr{ $$ = cat2_str(make_str("where"), $2); }
37293729
|/*EMPTY*/{$$ = EMPTY;/* no qualifiers*/ }
37303730
;
37313731

3732+
where_or_current_clause:WHEREa_expr {$$ = cat2_str(make_str("where"),$2); }
3733+
|WHERECURRENT_POFname {$$ = cat2_str(make_str("where current of"),$4); }
3734+
|WHERECURRENT_POFPARAM {$$ = make_str("where current of param"); }
3735+
|/*EMPTY*/ {$$ = EMPTY;/* no qualifiers*/ }
3736+
;
3737+
37323738
TableFuncElementList:TableFuncElement
37333739
{$$ =$1; }
37343740
|TableFuncElementList','TableFuncElement
@@ -5721,7 +5727,7 @@ ECPGDisconnect: SQL_DISCONNECT dis_name { $$ = $2; }
57215727
;
57225728

57235729
dis_name:connection_object{$$ =$1; }
5724-
|SQL_CURRENT{$$ = make_str("\"CURRENT\""); }
5730+
|CURRENT_P{$$ = make_str("\"CURRENT\""); }
57255731
|ALL{$$ = make_str("\"ALL\""); }
57265732
|/* EMPTY*/{$$ = make_str("\"CURRENT\""); }
57275733
;
@@ -6443,6 +6449,7 @@ ECPGunreserved_con: ABORT_P{ $$ = make_str("abort"); }
64436449
|CREATEROLE{$$ = make_str("createrole"); }
64446450
|CREATEUSER{$$ = make_str("createuser"); }
64456451
|CSV{$$ = make_str("csv"); }
6452+
|CURRENT_P {$$ = make_str("current"); }
64466453
|CURSOR{$$ = make_str("cursor"); }
64476454
|CYCLE{$$ = make_str("cycle"); }
64486455
|DATABASE{$$ = make_str("database"); }

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp