1

Is there a way to get a date and time of when a particular database was created in Postgresql?

The \list command does not provide a timestamp.

2

There's no built-in method to do so, but there are workarounds.

Note however that even PG_VERSION changes when the server is updated to a new major version.

So the only reliable way to store a creation date is to make a one-row table with the date in it.

If this feature is important to your application you could consider funding its development. I think it'd be pretty trivial to implement.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.