Skip site navigation (1) Skip section navigation (2)

[PATCH] Add size/acl information when listing databases

From: Andrew Gilligan <andy(at)tcpd(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: [PATCH] Add size/acl information when listing databases
Date: 2008-01-20 01:12:41
Message-ID: 488C2FE3-A6C7-4CFA-BD3C-F0588DA81F2E@tcpd.net (view raw or flat)
Thread:
Lists: 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: patch-psql-describe.c
Description: application/octet-stream (474 bytes)

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2008-01-20 02:06:59
Subject: Re: [PATCH] Add size/acl information when listing databases
Previous:From: Alvaro HerreraDate: 2008-01-20 01:11:44
Subject: Re: [pgtranslation-translators] message string fixes

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group