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

Commit0ba9b56

Browse files
author
Michael Meskes
committed
Synced parser.
1 parentc91ff03 commit0ba9b56

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

‎src/interfaces/ecpg/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2370,6 +2370,10 @@ Tue, 24 Jun 2008 13:30:51 +0200
23702370
Tue, 19 Aug 2008 12:32:24 +0200
23712371

23722372
- Fixed incorrect argument handling in SET command if argument is a variable.
2373+
2374+
Wed, 20 Aug 2008 15:49:23 +0200
2375+
2376+
- Synced parser.
23732377
- Set pgtypes library version to 3.1.
23742378
- Set compat library version to 3.1.
23752379
- Set ecpg library version to 6.2.

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

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.370 2008/08/19 10:40:32 meskes Exp $*/
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.371 2008/08/20 14:09:16 meskes Exp $*/
22

33
/* Copyright comment*/
44
%{
@@ -564,7 +564,7 @@ add_typedef(char *name, char * dimension, char * length, enum ECPGttype type_enu
564564
%type<str>TypenameSimpleTypenameNumericopt_floatDiscardStmt
565565
%type<str>Charactercharacteropt_varyingopt_charsetenum_val_list
566566
%type<str>opt_timezoneopt_intervaltable_reffetch_direction
567-
%type<str>ConstDatetimeAlterDomainStmtAlterSeqStmt
567+
%type<str>ConstDatetimeAlterDomainStmtAlterSeqStmttable_func_column
568568
%type<str>SelectStmtinto_clauseOptTempConstraintAttributeSpec
569569
%type<str>opt_tableopt_allsort_clausesortby_listConstraintAttr
570570
%type<str>sortbyqualified_name_listname_listColId_or_Sconst
@@ -590,7 +590,7 @@ add_typedef(char *name, char * dimension, char * length, enum ECPGttype type_enu
590590
%type<str>RemoveOperStmtRenameStmtall_Opopt_trustedopt_lancompiler
591591
%type<str>VariableSetStmtvar_valuezone_valueVariableShowStmt
592592
%type<str>VariableResetStmtAlterTableStmtfrom_listoverlay_list
593-
%type<str>relation_nameOptTableSpaceLockStmtopt_lock
593+
%type<str>relation_nameOptTableSpaceLockStmtopt_locktable_func_column_list
594594
%type<str>CreateUserStmtAlterUserStmtCreateSeqStmtSeqOptList
595595
%type<str>SeqOptElemTriggerForSpecTriggerForOptTriggerForType
596596
%type<str>DropTrigStmtTriggerOneEventTriggerEventsRuleActionStmt
@@ -2379,7 +2379,7 @@ fetch_direction: NEXT{ $$ = make_str("next"); }
23792379
fetch_count:IntConst{
23802380
if ($1[1] =='$')
23812381
{
2382-
/* a variable here has to be replaced on the client side, thus we have to use '?' here*/
2382+
/* a variable here has to be replaced on the client side, thus we have to use '$0' here*/
23832383
$$ = make_str("$0");
23842384
free($1);
23852385
}
@@ -2606,6 +2606,9 @@ opt_nulls_order: NULLS_FIRST { $$ = make_str("nulls first"); }
26062606
CreateFunctionStmt:CREATEopt_or_replaceFUNCTIONfunc_namefunc_args
26072607
RETURNSfunc_returncreatefunc_opt_listopt_definition
26082608
{$$ = cat_str(8, make_str("create"),$2, make_str("function"),$4,$5, make_str("returns"),$7,$8); }
2609+
|CREATEopt_or_replaceFUNCTIONfunc_namefunc_args
2610+
RETURNSTABLE'('table_func_column_list')'createfunc_opt_listopt_definition
2611+
{$$ = cat_str(9, make_str("create"),$2, make_str("function"),$4,$5, make_str("returns table ("),$9, make_str(")"),$11,$12); }
26092612
|CREATEopt_or_replaceFUNCTIONfunc_namefunc_args
26102613
createfunc_opt_listopt_definition
26112614
{$$ = cat_str(6, make_str("create"),$2, make_str("function"),$4,$5,$6,$7); }
@@ -2715,6 +2718,14 @@ opt_definition: WITH definition{ $$ = cat2_str(make_str("with"), $2); }
27152718
|/*EMPTY*/ {$$ = EMPTY; }
27162719
;
27172720

2721+
table_func_column:param_namefunc_type{$$ = cat2_str($1,$2); }
2722+
;
2723+
2724+
table_func_column_list:
2725+
table_func_column{$$ =$1; }
2726+
|table_func_column_list','table_func_column{$$ = cat_str(3,$1, make_str(","),$3); }
2727+
;
2728+
27182729
AlterFunctionStmt:
27192730
ALTERFUNCTIONfunction_with_argtypesalterfunc_opt_listopt_restrict
27202731
{$$ = cat_str(4, make_str("alter function"),$3,$4,$5); }
@@ -4383,6 +4394,10 @@ func_expr: func_name '(' ')'
43834394
{$$ = cat2_str($1, make_str("()"));}
43844395
|func_name'('expr_list')'
43854396
{$$ = cat_str(4,$1, make_str("("),$3, make_str(")"));}
4397+
|func_name'('VARIADICa_expr')'
4398+
{$$ = cat_str(4,$1, make_str("( variadic"),$4, make_str(")"));}
4399+
|func_name'('expr_list','VARIADICa_expr')'
4400+
{$$ = cat_str(6,$1, make_str("("),$3, make_str(", variadic"),$6, make_str(")"));}
43864401
|func_name'('ALLexpr_list')'
43874402
{$$ = cat_str(4,$1, make_str("( all"),$4, make_str(")"));}
43884403
|func_name'('DISTINCTexpr_list')'

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp