Re: [PATCH v5] Show detailed table persistence in \dt+ - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: [PATCH v5] Show detailed table persistence in \dt+
Date
Msg-id alpine.DEB.2.21.1904290831550.8815@lancre
Whole thread Raw
In response to Re: [PATCH v5] Show detailed table persistence in \dt+  (David Fetter <david@fetter.org>)
Responses Re: [PATCH v5] Show detailed table persistence in \dt+
List 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.

pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: [PATCH v4] Add \warn to psql
Next
From: David Rowley
Date:
Subject: Re: Speed up build on Windows by generating symbol definition in batch