Re: Table/View creation time

From: Avinash Patil <avinashpatil2020(at)gmail(dot)com>
To: Payal Singh <payal(at)omniti(dot)com>
Cc: Ram DBA <postgresdbas(at)gmail(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Table/View creation time
Date: 2017-01-04 05:24:09
Message-ID: CACi5znAPFksUxgrGE-SkmW71NKrxhmKFp8CSk=+Y7BVRhrh+mA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Dear Payal,

You can find out time when any database objects are created By using
Concepts of Event Trigger

Please refer this link

http://paquier.xyz/postgresql-2/postgres-9-3-feature-highlight-event-triggers/

Thanks
Avinash Patil

On Tue, Jan 3, 2017 at 8:53 PM, Payal Singh <payal(at)omniti(dot)com> wrote:

> You might be able to get some useful info by running stat on
> $PGDATA/base/<table's relid> (for instance when the file was created).
> Don't think this is applicable for a view though.
>
> A better way is to search for the respective DDL command in postgres log
> files, if you are logging all DDLs
>
> Payal
>
> Payal Singh,
> Database Administrator,
> OmniTI Computer Consulting Inc.
> Phone: 240.646.0770 x 253
>
> On Mon, Jan 2, 2017 at 5:17 AM, Ram DBA <postgresdbas(at)gmail(dot)com> wrote:
>
>> Hi team,
>>
>> Do we have a way of figuring out when a table/view is created in the
>> postgres database?
>>
>> ram=# \dv
>> List of relations
>> Schema | Name | Type | Owner
>> --------+--------+------+----------
>> public | v_test | view | postgres
>> (1 row)
>>
>>
>> Thank you,
>> Ram
>>
>
>

--
Thanks ,

Avinash Patil.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Achilleas Mantzios 2017-01-04 07:38:28 Re: Table/View creation time
Previous Message Payal Singh 2017-01-03 15:23:31 Re: Table/View creation time