column labels now with obligatory 'as' - Mailing list pgsql-hackers

From Zeugswetter Andreas DBT
Subject column labels now with obligatory 'as'
Date
Msg-id 219F68D65015D011A8E000006F8590C60F2523@sdexcsrv1.sd.spardat.at
Whole thread Raw
List pgsql-hackers
Hi all,

Have just tried 9. Jan snapshot on AIX 4.1.5,
compiles with gcc not with cc (fails in heaptuple.c), aix won't get
defined though, did a -Daix

The as keyword is now obligatory as in:

regression=> select name a, age b from emp;
ERROR:  parser: parse error at or near "a"

strange results as in (should be syntax error):
regression=> select name 'a' from emp;
?column?
--------
a
(1 row)

Since the other(DBMS)s don't insist on the as I would suggest not to be
stricter than the others even if it needs a lot of brainwork. (Tom ?)

Might try something like:
    if not registered right unary operator then label (probably no
good)
or
    force non alpha 1. char for unary operators (i think this is
best)
or even
    disallow creation of right and left unary operators alltogether
(can always use function instead)

hm... really not easy...
Comments ?

Andreas

pgsql-hackers by date:

Previous
From: "Thomas G. Lockhart"
Date:
Subject: Re: [HACKERS] varchar/char size
Next
From: darrenk@insightdist.com (Darren King)
Date:
Subject: Re: [HACKERS] varchar/char size