pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Luca Ferrari <fluca1978@gmail.com>
To: Vijaykumar Jain <vijaykumarjain.github@gmail.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: order by <tablename>
Date: Thu, 10 Jun 2021 11:00:57 +0200
Message-ID: <c73b4066b970347839301d842fdf4f646cd1f0ae.camel@cybertec.at> (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, 2021-06-10 at 10:39 +0200, Luca Ferrari wrote:
> 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.

I don't think it is really documented outside the source, but it is
called a "whole-row reference" and behaves in SQL like composite
data type that belongs to the table.

So ordering is lexicographical, equality is equality of all members,
and don't ask me about IS NULL and IS NOT NULL, else I point you to
https://www.postgresql.org/message-id/flat/48BDABE9-88AB-46E9-BABE-F70DDBFB98BD%40kineticode.com

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






view thread (6+ messages)  latest in thread

Message-ID: <c73b4066b970347839301d842fdf4f646cd1f0ae.camel@cybertec.at>
Permalink:  ../c73b4066b970347839301d842fdf4f646cd1f0ae.camel@cybertec.at/
Also on:    postgresql.org/message-id/c73b4066b970347839301d842fdf4f646cd1f0ae.camel@cybertec.at

 · 

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: laurenz.albe@cybertec.at, fluca1978@gmail.com, vijaykumarjain.github@gmail.com
  Subject: Re: order by <tablename>
  In-Reply-To: <c73b4066b970347839301d842fdf4f646cd1f0ae.camel@cybertec.at>
  References: <CAKoxK+5uLxLGo3CSeYX41mxiATbUgQ3P-KtU2FrB5X7ju1=QcQ@mail.gmail.com> <CAM+6J94_t9Vu33qbAtA14jJAm4eC5NXuWeDwyUscSiLFqfLEqw@mail.gmail.com> <CAKoxK+5Zd5uS6VoGNK9fYedfSH8a84MdY0YPDv_bksz+Rts7Mw@mail.gmail.com> <c73b4066b970347839301d842fdf4f646cd1f0ae.camel@cybertec.at>

* 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