Re: ORDER BY TABLENAME, possible bug - Mailing list pgsql-bugs

From Pantelis Theodosiou
Subject Re: ORDER BY TABLENAME, possible bug
Date
Msg-id CAE3TBxwNsfrHJc=XaTpZ3aq6=Z4PevcqQgQOi3wAh7mNB8pioA@mail.gmail.com
Whole thread Raw
In response to Re: ORDER BY TABLENAME, possible bug  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: ORDER BY TABLENAME, possible bug
List pgsql-bugs
On Sat, Oct 29, 2016 at 3:23 PM, Pavel Stehule <pavel.stehule@gmail.com>
wrote:

> Hi
>
> 2016-10-29 14:13 GMT+02:00 dv <udv.mail@gmail.com>:
>
>> E.g. query:
>>
>> SELECT col1, col2, col3
>> FROM table1
>> ORDER BY table1
>>
>> Postgres uses col1 for ASC ordering, if we write "ORDER BY table1
>> DESC" then DESC-ordering. I'm not sure this is a bug, but didn't find
>> description for such behaviour.
>>
>
> It is not bug. Postgresql's table has fictive column with same name as
> tablename that is composite of all columns
>
>
>
Is this somewhere in the documentation?  The only place I could find where
there is a hint of this use, is the Note in Row Constructors in
https://www.postgresql.org/docs/current/static/sql-expressions.html that
uses a table alias without the .* in an expression:   ROW(t, 42)

Pantelis Theodosiou

pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: BUG #14428: decode function don't return correct value when executed from agent's job or external program
Next
From: "David G. Johnston"
Date:
Subject: Re: ORDER BY TABLENAME, possible bug