public inbox for [email protected]
help / color / mirror / Atom feedFrom: Euler Taveira <[email protected]>
To: M.Atıf Ceylan <[email protected]>
To: pgsql-hackers <[email protected]>
Subject: Re: [PATCH] psql: add size-based sorting options (O/o) for tables and indexes
Date: Wed, 26 Nov 2025 09:43:38 -0300
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+M9mDThhJmuzN8umoPx2JhhKWkXpKO_1E3+4MCSdqE9SnmCjw@mail.gmail.com>
References: <CA+M9mDThhJmuzN8umoPx2JhhKWkXpKO_1E3+4MCSdqE9SnmCjw@mail.gmail.com>
On Wed, Nov 26, 2025, at 4:48 AM, M.Atıf Ceylan wrote:
> Hello,
> This patch adds two new meta-command modifiers for \dt(+) and \di(+):
>
> - O : sort by total relation size descending
> - o : sort by total relation size ascending
>
Thanks for your contribution. Register your patch in the next commitfest [1] so
we don't loose track of it.
I didn't look at your patch but I was wondering if a general solution isn't a
better way to add this feature. I wouldn't modify these specific psql
meta-commands, instead, I would add a new psql meta-command that defines this
property for all objects if applicable.
\sort [ name | size [ asc | desc ] ]
I thought about a list to be cover other sort cases too but if things starting
to be complex, it is time to write your own query.
With a parameter, it appends the ORDER BY clause in the SQL commands executed by
psql if applicable. Without a parameter, it uses the current behavior.
[1] https://commitfest.postgresql.org/57/
--
Euler Taveira
EDB https://www.enterprisedb.com/
view thread (7+ messages) latest in thread
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: [PATCH] psql: add size-based sorting options (O/o) for tables and indexes
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox