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

Commitce50945

Browse files
committed
Allow NumericOnly to be "+ FCONST".
The NumericOnly grammar production accepted ICONST, + ICONST, - ICONST,FCONST, and - FCONST, but for some reason not + FCONST. This led tostrange inconsistencies likeregression=# set random_page_cost = +4;SETregression=# set random_page_cost = 4000000000;SETregression=# set random_page_cost = +4000000000;ERROR: syntax error at or near "4000000000"(because 4000000000 is too large to be an ICONST). While there'sno actual functional reason to need to write a "+", if we allowit for integers it seems like we should allow it for numerics too.It's been like that forever, so back-patch to all supported branches.Discussion:https://postgr.es/m/30908.1496006184@sss.pgh.pa.us
1 parentdced55d commitce50945

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎src/backend/parser/gram.y

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4121,6 +4121,7 @@ opt_by:BY{}
41214121

41224122
NumericOnly:
41234123
FCONST{$$ = makeFloat($1); }
4124+
|'+'FCONST{$$ = makeFloat($2); }
41244125
|'-'FCONST
41254126
{
41264127
$$ = makeFloat($2);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp