简体   繁体   中英

Know the creation date of a column in a table

I search to kwow created date of column field in table for my postgresql 11. I haven't found information in "information_schema.columns"

Regards

Direct answer

Postgresql metadata does not contains creation or modification dates of DB objects.

So direct answer: it's impossible to find it from information_schema or from postgresql metadata objects.

Some limited possibilities exists to find this information from other sources.

A. Logs

Check:

SHOW log_statement;

if it's not none - then it's possible to search in postgresql log ALTER TABLE command.

If logs were not recycled then you're in luck.

B. Exploring files of database

It schould be possible to get some information exploring files of database. But requires knowledge of postgresql storage file layout .

Look for inspiration here: https://stackoverflow.com/a/30308875/1168212

If you don't have to filesystem and/or superuser rights - then no luck.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM