pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Munro <thomas.munro@gmail.com>
To: Luca Ferrari <fluca1978@gmail.com>
Cc: Vijaykumar Jain <vijaykumarjain.github@gmail.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: order by <tablename>
Date: Thu, 10 Jun 2021 20:58:18 +1200
Message-ID: <CA+hUKGJmwxnRYO2uDjAm5pAtskfWMWoUfeP-QYw0h1B7AcEfnQ@mail.gmail.com> (raw)
In-Reply-To: <CAKoxK+5Zd5uS6VoGNK9fYedfSH8a84MdY0YPDv_bksz+Rts7Mw@mail.gmail.com>
References: <CAKoxK+5uLxLGo3CSeYX41mxiATbUgQ3P-KtU2FrB5X7ju1=QcQ@mail.gmail.com>
	<CAM+6J94_t9Vu33qbAtA14jJAm4eC5NXuWeDwyUscSiLFqfLEqw@mail.gmail.com>
	<CAKoxK+5Zd5uS6VoGNK9fYedfSH8a84MdY0YPDv_bksz+Rts7Mw@mail.gmail.com>

On Thu, Jun 10, 2021 at 8:40 PM Luca Ferrari <fluca1978@gmail.com> wrote:
> On Thu, Jun 10, 2021 at 10:15 AM Vijaykumar Jain
> > 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.

There's something about this here:

https://www.postgresql.org/docs/13/rowtypes.html#ROWTYPES-USAGE





view thread (6+ messages)  latest in thread

Message-ID: <CA+hUKGJmwxnRYO2uDjAm5pAtskfWMWoUfeP-QYw0h1B7AcEfnQ@mail.gmail.com>
Permalink:  ../CA+hUKGJmwxnRYO2uDjAm5pAtskfWMWoUfeP-QYw0h1B7AcEfnQ@mail.gmail.com/
Also on:    postgresql.org/message-id/CA+hUKGJmwxnRYO2uDjAm5pAtskfWMWoUfeP-QYw0h1B7AcEfnQ@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: thomas.munro@gmail.com, fluca1978@gmail.com, vijaykumarjain.github@gmail.com
  Subject: Re: order by <tablename>
  In-Reply-To: <CA+hUKGJmwxnRYO2uDjAm5pAtskfWMWoUfeP-QYw0h1B7AcEfnQ@mail.gmail.com>
  References: <CAKoxK+5uLxLGo3CSeYX41mxiATbUgQ3P-KtU2FrB5X7ju1=QcQ@mail.gmail.com> <CAM+6J94_t9Vu33qbAtA14jJAm4eC5NXuWeDwyUscSiLFqfLEqw@mail.gmail.com> <CAKoxK+5Zd5uS6VoGNK9fYedfSH8a84MdY0YPDv_bksz+Rts7Mw@mail.gmail.com> <CA+hUKGJmwxnRYO2uDjAm5pAtskfWMWoUfeP-QYw0h1B7AcEfnQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox