pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <smarlowe@g2switchworks.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-sql@postgresql.org, Daniel CAUNE <d.caune@free.fr>
Subject: Re: SQL92 compliance
Date: Wed, 23 Aug 2006 13:28:36 -0500
Message-ID: <1156357716.7223.23.camel@state.g2switchworks.com> (raw)
In-Reply-To: <22448.1156354816@sss.pgh.pa.us>
References: <000301c6c655$0e3a0100$0b00a8c0@tedy>
	<200608231811.48538.peter_e@gmx.net>
	<22448.1156354816@sss.pgh.pa.us>

On Wed, 2006-08-23 at 12:40, Tom Lane wrote:
> Peter Eisentraut <peter_e@gmx.net> writes:
> > Am Mittwoch, 23. August 2006 03:40 schrieb Daniel CAUNE:
> >> Is AS in "SELECT my_column AS my_name FROM my_table" mandatory to be SQL92
> >> compliant?
> 
> > No.  I have a patch at 
> > <http://developer.postgresql.org/~petere/select-without-as/select-without-as.patch; 
> > that fixes this at least for 7.4.
> 
> I think it's a big stretch to say that that patch fixes it, since it
> only allows an AS-less target expression to be c_expr rather than
> a_expr as it ought to.
> 
> The problem is really insoluble given that we allow user-defined
> postfix operators: is "SELECT x ~~ y" meant to be an infix operator
> with arguments x and y, or a postfix operator with argument x and
> a column label y?
> 
> When this has come up in the past, we've always concluded that
> compliance with this not-very-well-thought-out detail of the spec
> is not worth the price of giving up postfix operators.
> 
> Even if we were willing to do that, I think we'd also have to give
> up using bison to generate the parser :-( because some constructs
> would require more than one-token lookahead.

Would it be possible if we required postfix operators and related to be
inside parens?

select x ~~ y as yabba
OR
select (x ~~ y) yabba

Not that I'd want that.  I prefer it the way it is too.  Just more of an
intellectual exercise.



view thread (7+ messages)  latest in thread

Message-ID: <1156357716.7223.23.camel@state.g2switchworks.com>
Permalink:  ../1156357716.7223.23.camel@state.g2switchworks.com/
Also on:    postgresql.org/message-id/1156357716.7223.23.camel@state.g2switchworks.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: smarlowe@g2switchworks.com, tgl@sss.pgh.pa.us, peter_e@gmx.net, d.caune@free.fr
  Subject: Re: SQL92 compliance
  In-Reply-To: <1156357716.7223.23.camel@state.g2switchworks.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox