Re: Get the date of creation of objects in the database

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: "Edson F(dot) Lidorio" <edson(at)openmailbox(dot)org>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Get the date of creation of objects in the database
Date: 2016-02-22 22:12:02
Message-ID: 56CB87B2.3020009@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 02/22/2016 02:00 PM, Edson F. Lidorio wrote:
> Hello,
>
> How to get the date of creation of objects in batabase?
> For example: The date of creation of tables and trigger.

AFAIK that is not recorded by default. If you are using Postgres 9.3+
you could roll your own audit system, going forward, using event triggers:

http://www.postgresql.org/docs/9.5/interactive/event-triggers.html

Take a look at matrix below for what is included and not included:

http://www.postgresql.org/docs/9.5/interactive/event-trigger-matrix.html

PL/pgSQL example:

http://www.postgresql.org/docs/9.5/interactive/plpgsql-trigger.html#PLPGSQL-EVENT-TRIGGER

>
> Thank you;
>
> Edson
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2016-02-22 22:13:12 Re: Get the date of creation of objects in the database
Previous Message Edson F. Lidorio 2016-02-22 22:00:23 Get the date of creation of objects in the database