Re: allow to \dtS+ pg_toast.*

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: allow to \dtS+ pg_toast.*
Date: 2020-12-17 15:16:52
Message-ID: 1839fe7148f3aa1a7b28da9064a5c2f8b08316c3.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 2020-11-30 at 10:54 -0600, Justin Pryzby wrote:
> This makes toast tables a bit less special and easier to inspect.
>
> postgres=# \dtS+ pg_toast.pg_toast_2619
> pg_toast | pg_toast_2619 | toast table | pryzbyj | permanent | heap | 56 kB |
>
> This follows commit from last year:
> | eb5472da9 make \d pg_toast.foo show its indices ; and, \d toast show its main table

This would indeed be convenient.

The patch passes regression tests.

While playing around with it, I found the following oddity:

regression=# \dtS+ pg_toast.pg_toast_30701
List of relations
Schema | Name | Type | Owner | Persistence | Access Method | Size | Description
----------+----------------+-------------+---------+-------------+---------------+---------+-------------
pg_toast | pg_toast_30701 | toast table | laurenz | permanent | heap | 0 bytes |
(1 row)

regression=# \dtS pg_toast.pg_toast_30701
List of relations
Schema | Name | Type | Owner
----------+----------------+-------------+---------
pg_toast | pg_toast_30701 | toast table | laurenz
(1 row)

regression=# \dt pg_toast.pg_toast_30701
Did not find any relation named "pg_toast.pg_toast_30701".

Now this doesn't seem right. To my understanding, \dtS should do the same as \dt,
except that it should also search in "pg_catalog" if no schema was provided.

Another thing that is missing is tab completion for

regression=# \dtS pg_toast.pg_

This should work just like for \d and \dS.

Both of these effects can also be observed with \di and toast indexes.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2020-12-17 15:37:11 Re: \gsetenv
Previous Message Bharath Rupireddy 2020-12-17 15:02:57 Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit