Re: Adding date column to system catalog "pg_database" - Mailing list pgsql-admin

From Achilleas Mantzios
Subject Re: Adding date column to system catalog "pg_database"
Date
Msg-id 46045a2d-1156-7e39-f1f7-a05c701b5410@matrix.gatewaynet.com
Whole thread Raw
In response to Adding date column to system catalog "pg_database"  (pavan95 <pavan.postgresdba@gmail.com>)
List pgsql-admin
On 07/06/2018 14:05, pavan95 wrote:
> Hi all,
>
> Is it possible to add date column to "pg_database" view by altering the
> table?
>
> Reason is to get the created date of each database, I will schedule a
> trigger to update the date column with current server time. By this I can
> get the db creation date every now from the point of creation of new db.
>
> Any ideas in accomplishment of this task are of great help!
Write your own function that implements this. Some OS's/filesys give the info on file/directory creation time. (Most
modernlinuxes don't out of the box). Then write your view (e.g. mypg_database) and 
 
use this.
Do not by any means try to alter any pg_catalog object.

>
> Thanks in advance.
>
>
>
> Regards,
> Pavan
>
>
>
> --
> Sent from: http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html
>

-- 
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt



pgsql-admin by date:

Previous
From: pavan95
Date:
Subject: Adding date column to system catalog "pg_database"
Next
From: Shreeyansh Dba
Date:
Subject: Re: Adding date column to system catalog "pg_database"