BUG #5193: should "select * from ab limitkkk" cause a syntax error?
The following bug has been logged online:
Bug reference: 5193
Logged by:
Email address: donniehan@126.com
PostgreSQL version: 8.4.1
Operating system: Windows XP
Description: should "select * from ab limitkkk" cause a syntax error?
Details:
Hi guys,
The following sql statement is not illegal
But pg can run it.
postgres=# select * from a limitkkk; ---->(seems equal "limit null")
a
---
1
1
1
1
1
(5 rows)
Should pg throws a syntax error?
Regards
-Dongni
"" <donniehan@126.com> writes:
postgres=# select * from a limitkkk; ---->(seems equal "limit null")
Should pg throws a syntax error?
If we did, we'd be violating the SQL standard. The "limitkkk"
is a perfectly valid table alias. There's no AS in front of it,
but unfortunately the spec allows and even encourages people to
omit AS.
regards, tom lane