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

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: David Fetter <david(at)fetter(dot)org>
Cc: Rafia Sabih <rafia(dot)pghackers(at)gmail(dot)com>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH v5] Show detailed table persistence in \dt+
Date: 2019-04-29 06:48:17
Message-ID: alpine.DEB.2.21.1904290831550.8815@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2019-04-29 07:36:52 Re: Speed up build on Windows by generating symbol definition in batch
Previous Message Fabien COELHO 2019-04-29 06:30:18 Re: [PATCH v4] Add \warn to psql