it works, but is it legal to separate schema/table/field references using spaces

Started by Frank van Vugtover 18 years ago2 messagesgeneral
Jump to latest
#1Frank van Vugt
ftm.van.vugt@foxi.nl

Hi,

Just something I noticed to 'simply work':

db=# select avg(pg_catalog . pg_stats . avg_width) from pg_stats;
avg
---------------------
10.6654945054945055
(1 row)

It seems that all whitespace between schema/table/field references is ignored?

Not saying this is a bad thing per se, it just surprised me and made me wonder
if this intended to work like this and/or legal per sql-specs ;)

db=# select version();
version
------------------------------------------------------------------------
PostgreSQL 8.2.4 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.3
(1 row)

--
Best,

Frank.

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Frank van Vugt (#1)
Re: it works, but is it legal to separate schema/table/field references using spaces

Frank van Vugt wrote:

db=# select avg(pg_catalog � �. � pg_stats � � . avg_width) from
pg_stats;

It seems that all whitespace between schema/table/field references is
ignored?

Sure, this is perfectly valid per SQL and what not.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/