From: | Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com> |
---|---|
To: | pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | Re: Adding date column to system catalog "pg_database" |
Date: | 2018-06-07 11:14:23 |
Message-ID: | 46045a2d-1156-7e39-f1f7-a05c701b5410@matrix.gatewaynet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 modern linuxes 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
From | Date | Subject | |
---|---|---|---|
Next Message | Shreeyansh Dba | 2018-06-07 11:42:43 | Re: Adding date column to system catalog "pg_database" |
Previous Message | pavan95 | 2018-06-07 11:05:44 | Adding date column to system catalog "pg_database" |