> --- t...@sss.pgh.pa.us wrote:
> The short answer here is that the SQL committee changed their minds
> between SQL92 and later editions of the standard, and PG is attempting
> to split the difference and be reasonably compliant with both versions.
> ...
Thanks Tom! I'll use this as well to make
> --- david.g.johns...@gmail.com wrote:
>
> On Fri, Mar 31, 2017 at 2:45 PM, wrote:
>
> > I can go with that now that I understand it (and I did not read the docs
> > that way), but I guess I was expecting it to see that "upper(name)" isn't
> > there, so it should pull that expression apart, find
"" writes:
> I can go with that now that I understand it (and I did not read the docs that
> way), but I guess I was expecting it to see that "upper(name)" isn't there,
> so it should pull that expression apart, find "name" and see that in the
> output list before it starts searching the input
On Fri, Mar 31, 2017 at 2:45 PM, wrote:
>
> I can go with that now that I understand it (and I did not read the docs
> that way), but I guess I was expecting it to see that "upper(name)" isn't
> there, so it should pull that expression apart, find "name" and see that in
> the output list before i
Thank you Brian and David, I'll use David's reply to refine my question...
--- david.g.johns...@gmail.com wrote:
> From: "David G. Johnston"
> > On Friday, March 31, 2017, wrote:
> >
> > SELECT t1.pk, t1.name, t1.ref, CONCAT( t2.id , ':', t2.name ) AS
> > ref_display
> > FROM test_
On Friday, March 31, 2017, wrote:
> I'm hoping someone can give us a little help understanding an error in the
> ORDER BY clause, because when I read https://www.postgresql.org/
> docs/9.5/static/sql-select.html#SQL-ORDERBY I just don't see anything
> that explains the behavior.
>
> SELECT t1
From the docs you linked:
"Each expression can be the name or ordinal number of an output column
(SELECT list item), or it can be an arbitrary expression formed from
input-column values."
The "name" in your order by is a reference to the output column. The
following example shows the same with "
I'm hoping someone can give us a little help understanding an error in the
ORDER BY clause, because when I read
https://www.postgresql.org/docs/9.5/static/sql-select.html#SQL-ORDERBY I just
don't see anything that explains the behavior.
This is with Pg-9.5.1 on Centos (not that I think the OS m