Re: [PATCH v5] Show detailed table persistence in \dt+

Поиск
Список
Период
Сортировка
Искать
От
Fabien COELHO
Тема
Re: [PATCH v5] Show detailed table persistence in \dt+
Дата
Msg-id
alpine.DEB.2.21.1904290831550.8815@lancre
Ответ на
Список
Дерево обсуждения
[PATCH v1] Show whether tables are logged in \dt+ David Fetter <david@fetter.org>
Re: [PATCH v1] Show whether tables are logged in \dt+ Fabien COELHO <coelho@cri.ensmp.fr>
Re: [PATCH v1] Show whether tables are logged in \dt+ David Fetter <david@fetter.org>
Re: [PATCH v1] Show whether tables are logged in \dt+ Fabien COELHO <coelho@cri.ensmp.fr>
Re: [PATCH v1] Show whether tables are logged in \dt+ Rafia Sabih <rafia.pghackers@gmail.com>
Re: [PATCH v1] Show whether tables are logged in \dt+ Rafia Sabih <rafia.pghackers@gmail.com>
Re: [PATCH v1] Show whether tables are logged in \dt+ David Fetter <david@fetter.org>
nRe: [PATCH v1] Show whether tables are logged in \dt+ Fabien COELHO <coelho@cri.ensmp.fr>
Re: nRe: [PATCH v1] Show whether tables are logged in \dt+ David Fetter <david@fetter.org>
Re: nRe: [PATCH v1] Show whether tables are logged in \dt+ Fabien COELHO <coelho@cri.ensmp.fr>
[PATCH v5] Show detailed table persistence in \dt+ David Fetter <david@fetter.org>
Re: [PATCH v5] Show detailed table persistence in \dt+ Tom Lane <tgl@sss.pgh.pa.us>
Re: [PATCH v5] Show detailed table persistence in \dt+ David Fetter <david@fetter.org>
Re: [PATCH v5] Show detailed table persistence in \dt+ Fabien COELHO <fabien.coelho@mines-paristech.fr>
Re: [PATCH v5] Show detailed table persistence in \dt+ David Fetter <david@fetter.org>
Re: [PATCH v5] Show detailed table persistence in \dt+ Fabien COELHO <coelho@cri.ensmp.fr>
Re: [PATCH v5] Show detailed table persistence in \dt+ David Fetter <david@fetter.org>
Re: [PATCH v5] Show detailed table persistence in \dt+ Tom Lane <tgl@sss.pgh.pa.us>
Re: [PATCH v5] Show detailed table persistence in \dt+ Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [PATCH v5] Show detailed table persistence in \dt+ Tom Lane <tgl@sss.pgh.pa.us>
Re: [PATCH v5] Show detailed table persistence in \dt+ Daniel Gustafsson <daniel@yesql.se>
Re: [PATCH v5] Show detailed table persistence in \dt+ Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [PATCH v5] Show detailed table persistence in \dt+ Daniel Gustafsson <daniel@yesql.se>
Re: [PATCH v5] Show detailed table persistence in \dt+ Tom Lane <tgl@sss.pgh.pa.us>
Re: [PATCH v5] Show detailed table persistence in \dt+ Fabien COELHO <coelho@cri.ensmp.fr>
Re: [PATCH v1] Show whether tables are logged in \dt+ Rafia Sabih <rafia.pghackers@gmail.com>

Hello David,

> My mistake. Fixed.

About v6: applies, compiles, make check ok.

Code is ok.

Maybe there could be a comment to tell that prior version are not 
addressed, something like:

     ...
   }
   /* else do not bother guessing the temporary status on old version */

No tests, pending an added TAP test infrastructure for psql.

I have a question a out the index stuff: indexes seem to appear as entries 
in pg_class, and ISTM that they can be temporary/unlogged/permanent as 
attached to corresponding objects. So the guard is not very useful and it 
could make sense to show the information on indexes as well.

After removing the guard:

  postgres=# \dtmv+ *foo*
                                     List of relations
  ┌───────────┬──────┬───────────────────┬────────┬─────────────┬─────────┬─────────────┐
  │  Schema   │ Name │       Type        │ Owner  │ Persistence │  Size   │ Description │
  ├───────────┼──────┼───────────────────┼────────┼─────────────┼─────────┼─────────────┤
  │ pg_temp_3 │ foo  │ table             │ fabien │ temporary   │ 0 bytes │             │
  │ public    │ mfoo │ materialized view │ fabien │ permanent   │ 0 bytes │             │
  │ public    │ ufoo │ table             │ fabien │ unlogged    │ 0 bytes │             │
  └───────────┴──────┴───────────────────┴────────┴─────────────┴─────────┴─────────────┘
  (3 rows)

  postgres=# \di+ *foo*
                                      List of relations
  ┌───────────┬───────────┬───────┬────────┬───────┬─────────────┬────────────┬─────────────┐
  │  Schema   │   Name    │ Type  │ Owner  │ Table │ Persistence │    Size    │ Description │
  ├───────────┼───────────┼───────┼────────┼───────┼─────────────┼────────────┼─────────────┤
  │ pg_temp_3 │ foo_pkey  │ index │ fabien │ foo   │ temporary   │ 8192 bytes │             │
  │ public    │ ufoo_pkey │ index │ fabien │ ufoo  │ unlogged    │ 16 kB      │             │
  │ public    │ ufoou     │ index │ fabien │ ufoo  │ unlogged    │ 16 kB      │             │
  └───────────┴───────────┴───────┴────────┴───────┴─────────────┴────────────┴─────────────┘
  (3 rows)

Is there a special reason not to show it?

-- 
Fabien.
В списке pgsql-hackers по дате отправления
От: Fabien COELHO
Дата:
От: David Rowley
Дата:
FAQ