Re: Debugging postmaster to fix possible bug in Postgres? Followup

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Debugging postmaster to fix possible bug in Postgres? Followup
Дата
Msg-id 2032.1045180109@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Debugging postmaster to fix possible bug in Postgres? Followup  (Dmitry Tkach <dmitry@openratings.com>)
Список 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 по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Extending Datatype
Следующее
От: Tom Lane
Дата:
Сообщение: Re: SQL Functions vs PL/PgSQL