Re: Adding date column to system catalog "pg_database"
От | Achilleas Mantzios |
---|---|
Тема | Re: Adding date column to system catalog "pg_database" |
Дата | |
Msg-id | 46045a2d-1156-7e39-f1f7-a05c701b5410@matrix.gatewaynet.com обсуждение исходный текст |
Ответ на | Adding date column to system catalog "pg_database" (pavan95 <pavan.postgresdba@gmail.com>) |
Список | 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 по дате отправления: