How can I find the table creation time in PostgreSQL?
Example: If I created a file I can find the file creation time like that I want to know the table creation time.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I had a look through the pg_* tables, and I couldn’t find any creation times in there. It’s possible to locate the table files, but then on Linux you can’t get file creation time. So I think the answer is that you can only find this information on Windows, using the following steps:
select datname, datdba from pg_database;select relname, relfilenode from pg_class;<PostgreSQL folder>/main/base/<database id>/<table filenode id>(not sure what it is on Windows).