From: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Hervé Piedvache <herve(at)elma(dot)fr>, Darko Prenosil <darko(dot)prenosil(at)finteh(dot)hr>, Postgresql General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Why lower's not accept an AS declaration ? |
Date: | 2003-08-19 05:52:45 |
Message-ID: | 20030818220329.E50766-100000@megazone.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, 19 Aug 2003, Tom Lane wrote:
> I said:
> > After reading over the spec again I finally realized the significance of
> > this bit:
>
> > i) Let X be any <column reference> directly contained in K(i).
> > ii) If X does not contain an explicit <table or query name> or
> > <correlation name>, then K(i) shall be a <column name> that
> > shall be equivalent to the name of exactly one column of
> > ST.
>
> Wait a second ... this is a classic case of reading what you expected
> rather than what's there. I thought that (ii) said "If X does not ...
> then X shall be ..." but that's not what it says --- the "then" says
> that the whole sort-key K(i) must be an output-column name.
Err, yeah. That's certainly different than reading that as then X shall
be. :(
> In other words, SQL99 does not allow expressions over output-column
> names. An output-column reference can only appear as a simple name
> (same as SQL92, and same as what we allow). SQL99 allows expressions
> over input-column names ... but only if the expressions use
> fully-qualified input-column names.
>
> This last is such a stupid restriction that I can't believe I'm reading
> it right; is it just too late at night for me?
Yeah. These rules don't seem to make much sense, why bother making
it a general value expression if you're going to limit it like that?
It almost makes me wonder what SQL200x is going to do to the clause.
How about we forget that I ever brought it up. ;)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-08-19 06:07:51 | Re: array concat, et al patch |
Previous Message | Joe Conway | 2003-08-19 05:32:21 | Re: array concat, et al patch |