Re: allow to \dtS+ pg_toast.* - Mailing list pgsql-hackers

From Laurenz Albe
Subject Re: allow to \dtS+ pg_toast.*
Date
Msg-id 1839fe7148f3aa1a7b28da9064a5c2f8b08316c3.camel@cybertec.at
Whole thread Raw
In response to allow to \dtS+ pg_toast.*  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: allow to \dtS+ pg_toast.*
List 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




pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit
Next
From: Andrew Dunstan
Date:
Subject: Re: \gsetenv