Re: order by <tablename>

From: Luca Ferrari <fluca1978(at)gmail(dot)com>
To: Vijaykumar Jain <vijaykumarjain(dot)github(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: order by <tablename>
Date: 2021-06-10 08:39:59
Message-ID: CAKoxK+5Zd5uS6VoGNK9fYedfSH8a84MdY0YPDv_bksz+Rts7Mw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jun 10, 2021 at 10:15 AM Vijaykumar Jain
<vijaykumarjain(dot)github(at)gmail(dot)com> wrote:
> you can run an explain analyze to check what is going on,
> when you provide a table in query in the order by clause, it is
> ordered by cols of that table in that order.

Clever, thanks!
I also realized that this "table to tuples" expansion works for GROUP BY too.
However, I'm not able to find this documented in GROUP BY, WHERE,
ORDER BY clauses sections into select documentation
<fgrouphttps://www.postgresql.org/docs/12/sql-select.html>. Could be
my fault, of course.

Luca

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Munro 2021-06-10 08:58:18 Re: order by <tablename>
Previous Message Vijaykumar Jain 2021-06-10 08:15:28 Re: order by <tablename>