Hi Pavan,
As pg_database is a system catalog table and you can not add or alter it even you are superuser.
You can get the database related information which you are looking for using below query.
SELECT (pg_stat_file('base/'||oid ||'/PG_VERSION')).modification, datname FROM pg_database;
Hope this helps..
As pg_database is a system catalog table and you can not add or alter it even you are superuser.
You can get the database related information which you are looking for using below query.
SELECT (pg_stat_file('base/'||oid ||'/PG_VERSION')).modification, datname FROM pg_database;
Hope this helps..
On Thu, Jun 7, 2018 at 4:35 PM, pavan95 <pavan.postgresdba@xxxxxxxxx> 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!
Thanks in advance.
Regards,
Pavan
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-admin-f2076596. html