[PATCH] Add size/acl information when listing databases - Mailing list pgsql-hackers

From Andrew Gilligan
Subject [PATCH] Add size/acl information when listing databases
Date
Msg-id 488C2FE3-A6C7-4CFA-BD3C-F0588DA81F2E@tcpd.net
Whole thread Raw
Responses Re: [PATCH] Add size/acl information when listing databases  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Greetings,

Attached is a rather small change to src/bin/psql/describe.c to
show database size and permissions when using the psql \l command.

Typical output would be:

                                  List of databases
    Name    | Owner | Encoding |  Size   |             Access privileges
-----------+-------+----------+---------
+-------------------------------------------
  andy      | andy  | UTF8     | 734 MB  | {andy=CTc/andy}
  postgres  | pgsql | UTF8     | 3914 kB |
  template0 | pgsql | UTF8     | 3656 kB | {=c/pgsql,pgsql=CTc/pgsql}
  template1 | pgsql | UTF8     | 4034 kB | {=c/pgsql,pgsql=CTc/pgsql}


Hope someone finds this useful.

Best regards,
-Andy




Attachment

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [pgtranslation-translators] message string fixes
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] Add size/acl information when listing databases