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

Commit1511534

Browse files
committed
Just noticed that the grammar actually has no provision for '+' as a
prefix operator :-(. Bad enough that we have no implementation ofunary plus, but at least with this fix the grammar will take it.
1 parentcaa6fc1 commit1511534

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

‎src/backend/parser/gram.y

Lines changed: 8 additions & 3 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.158 2000/03/1800:33:45 momjian Exp $
14+
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.159 2000/03/1804:32:35 tgl Exp $
1515
*
1616
* HISTORY
1717
* AUTHORDATEMAJOR EVENT
@@ -4168,6 +4168,8 @@ a_expr: c_expr
41684168
* If you add more explicitly-known operators, be sure to add them
41694169
* also to b_expr and to the MathOp list above.
41704170
*/
4171+
|'+'a_expr %precUMINUS
4172+
{$$ = makeA_Expr(OP,"+",NULL,$2); }
41714173
|'-'a_expr %precUMINUS
41724174
{$$ = doNegate($2); }
41734175
|'%'a_expr
@@ -4384,6 +4386,8 @@ b_expr: c_expr
43844386
{$$ =$1; }
43854387
|b_exprTYPECASTTypename
43864388
{$$ = makeTypeCast($1,$3); }
4389+
|'+'b_expr %precUMINUS
4390+
{$$ = makeA_Expr(OP,"+",NULL,$2); }
43874391
|'-'b_expr %precUMINUS
43884392
{$$ = doNegate($2); }
43894393
|'%'b_expr
@@ -5480,8 +5484,9 @@ mapTargetColumns(List *src, List *dst)
54805484
* Do not convert "float", since that is handled elsewhere
54815485
* for FLOAT(p) syntax.
54825486
*
5483-
* Converting "datetime" to "timestamp" is a temporary expedient for
5484-
*pre-7.0 to 7.0 compatibility; it should go away again someday.
5487+
* Converting "datetime" to "timestamp" and "timespan" to "interval"
5488+
* is a temporary expedient for pre-7.0 to 7.0 compatibility;
5489+
* these should go away someday.
54855490
*/
54865491
staticchar *
54875492
xlateSqlFunc(char *name)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp