pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedTable/View creation time
4+ messages / 4 participants
[nested] [flat]
* Table/View creation time
@ 2017-01-02 10:17 Ram DBA <postgresdbas@gmail.com>
2017-01-03 15:23 ` Re: Table/View creation time Payal Singh <payal@omniti.com>
0 siblings, 1 reply; 4+ messages in thread
From: Ram DBA @ 2017-01-02 10:17 UTC (permalink / raw)
To: pgsql-admin
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Table/View creation time
2017-01-02 10:17 Table/View creation time Ram DBA <postgresdbas@gmail.com>
@ 2017-01-03 15:23 ` Payal Singh <payal@omniti.com>
2017-01-04 05:24 ` Re: Table/View creation time Avinash Patil <avinashpatil2020@gmail.com>
2017-01-04 07:38 ` Re: Table/View creation time Achilleas Mantzios <achill@matrix.gatewaynet.com>
0 siblings, 2 replies; 4+ messages in thread
From: Payal Singh @ 2017-01-03 15:23 UTC (permalink / raw)
To: Ram DBA <postgresdbas@gmail.com>; +Cc: pgsql-admin
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@gmail.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
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Table/View creation time
2017-01-02 10:17 Table/View creation time Ram DBA <postgresdbas@gmail.com>
2017-01-03 15:23 ` Re: Table/View creation time Payal Singh <payal@omniti.com>
@ 2017-01-04 05:24 ` Avinash Patil <avinashpatil2020@gmail.com>
1 sibling, 0 replies; 4+ messages in thread
From: Avinash Patil @ 2017-01-04 05:24 UTC (permalink / raw)
To: Payal Singh <payal@omniti.com>; +Cc: Ram DBA <postgresdbas@gmail.com>; 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@omniti.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@gmail.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.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Table/View creation time
2017-01-02 10:17 Table/View creation time Ram DBA <postgresdbas@gmail.com>
2017-01-03 15:23 ` Re: Table/View creation time Payal Singh <payal@omniti.com>
@ 2017-01-04 07:38 ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
1 sibling, 0 replies; 4+ messages in thread
From: Achilleas Mantzios @ 2017-01-04 07:38 UTC (permalink / raw)
To: pgsql-admin
On 03/01/2017 17:23, Payal Singh 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.
Modern Linux'es do not support exposing creation time. EXT4 stores this 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@gmail.com <mailto:postgresdbas@gmail.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
>
>
--
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2017-01-04 07:38 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-01-02 10:17 Table/View creation time Ram DBA <postgresdbas@gmail.com>
2017-01-03 15:23 ` Payal Singh <payal@omniti.com>
2017-01-04 05:24 ` Avinash Patil <avinashpatil2020@gmail.com>
2017-01-04 07:38 ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox