The following bug has been logged on the website:
Bug reference: 13754
Logged by: Ryan Vilim
Email address: ryan.vilim@gmail.com
PostgreSQL version: 9.4.1
Operating system: Mac
Description:
I recently found that postgres will accept the
SELECT -144mycol
to be equivalent to
SELECT -144 AS mycol.
As long as the first bits work out to be numbers it accepts it. For example,
it will also interpret
SELECT FLOOR(-144.4)*4mycol
as
SELECT FLOOR(144.4)*4 as mycol
I haven't been able to find any other references to this being standard SQL.
I think it might be a bug in postgres.
Ryan