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

Commit3ff7673

Browse files
committed
Simplify the rules that explicitly allowed TYPE as a type name (which is
no longer the case). Add AND and TRAILING to ColLabel. All key wordsexcept AS are now at least ColLabel's.
1 parent96bd67f commit3ff7673

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

‎src/backend/parser/gram.y

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.213 2001/01/05 06:34:18 tgl Exp $
14+
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.214 2001/01/06 10:50:02 petere Exp $
1515
*
1616
* HISTORY
1717
* AUTHORDATEMAJOR EVENT
@@ -252,8 +252,8 @@ static void doNegateFloat(Value *v);
252252
%type<paramno>ParamNo
253253

254254
%type<typnam>Typename,SimpleTypename,ConstTypename
255-
Generic,Numeric,Geometric,Character,ConstDatetime,ConstInterval,Bit
256-
%type<str>generic,character,datetime,bit
255+
GenericType,Numeric,Geometric,Character,ConstDatetime,ConstInterval,Bit
256+
%type<str>character,datetime,bit
257257
%type<str>extract_arg
258258
%type<str>opt_charset,opt_collate
259259
%type<str>opt_float
@@ -3845,26 +3845,22 @@ SimpleTypename: ConstTypename
38453845
|ConstInterval
38463846
;
38473847

3848-
ConstTypename:Generic
3848+
ConstTypename:GenericType
38493849
|Numeric
38503850
|Geometric
38513851
|Bit
38523852
|Character
38533853
|ConstDatetime
38543854
;
38553855

3856-
Generic:generic
3856+
GenericType:IDENT
38573857
{
38583858
$$ = makeNode(TypeName);
38593859
$$->name = xlateSqlType($1);
38603860
$$->typmod = -1;
38613861
}
38623862
;
38633863

3864-
generic:IDENT{$$ =$1; }
3865-
|TYPE_P{$$ ="type"; }
3866-
;
3867-
38683864
/* SQL92 numeric data types
38693865
* Check FLOAT() precision limits assuming IEEE floating types.
38703866
* Provide real DECIMAL() and NUMERIC() implementations now - Jan 1998-12-30
@@ -5392,7 +5388,7 @@ UserId: ColId{ $$ = $1; };
53925388
* list due to shift/reduce conflicts in yacc. If so, move
53935389
* down to the ColLabel entity. - thomas 1997-11-06
53945390
*/
5395-
ColId:generic{$$ =$1; }
5391+
ColId:IDENT{$$ =$1; }
53965392
|datetime{$$ =$1; }
53975393
|TokenId{$$ =$1; }
53985394
|INTERVAL{$$ ="interval"; }
@@ -5520,6 +5516,7 @@ TokenId: ABSOLUTE{ $$ = "absolute"; }
55205516
|TRIGGER{$$ ="trigger"; }
55215517
|TRUNCATE{$$ ="truncate"; }
55225518
|TRUSTED{$$ ="trusted"; }
5519+
|TYPE_P{$$ ="type"; }
55235520
|UNLISTEN{$$ ="unlisten"; }
55245521
|UNTIL{$$ ="until"; }
55255522
|UPDATE{$$ ="update"; }
@@ -5549,6 +5546,7 @@ ColLabel: ColId{ $$ = $1; }
55495546
|ALL{$$ ="all"; }
55505547
|ANALYSE{$$ ="analyse"; }/* British*/
55515548
|ANALYZE{$$ ="analyze"; }
5549+
|AND{$$ ="and"; }
55525550
|ANY{$$ ="any"; }
55535551
|ASC{$$ ="asc"; }
55545552
|BETWEEN{$$ ="between"; }
@@ -5647,6 +5645,7 @@ ColLabel: ColId{ $$ = $1; }
56475645
|TABLE{$$ ="table"; }
56485646
|THEN{$$ ="then"; }
56495647
|TO{$$ ="to"; }
5648+
|TRAILING{$$ ="trailing"; }
56505649
|TRANSACTION{$$ ="transaction"; }
56515650
|TRIM{$$ ="trim"; }
56525651
|TRUE_P{$$ ="true"; }

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp