Re: Debugging postmaster to fix possible bug in Postgres? Followup - Mailing list pgsql-sql

From Tom Lane
Subject Re: Debugging postmaster to fix possible bug in Postgres? Followup
Date
Msg-id 2032.1045180109@sss.pgh.pa.us
Whole thread Raw
In response to Re: Debugging postmaster to fix possible bug in Postgres? Followup  (Dmitry Tkach <dmitry@openratings.com>)
List pgsql-sql
Dmitry Tkach <dmitry@openratings.com> writes:
> Then it looks like postgres behaviour is still not compliant, if I read it correctly, because
> select x from mytable order by y;
> should be invalid according to this, but works just fine in postres.

Yup, it's an extension --- as indeed is pointed out at the bottom of our
SELECT reference page.  But it's a well-defined extension, because every
row of the result does have a clearly associated value of y.  Once you
throw in GROUP BY or aggregates, you can't order by values that aren't
constrained by the grouping.
        regards, tom lane


pgsql-sql by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Extending Datatype
Next
From: Tom Lane
Date:
Subject: Re: SQL Functions vs PL/PgSQL