For debugging purposes I would like to know when are some of my postgres schemas created at- is it possible?
Searched from PostgreSQL and Apartment docs but didn't find any helpful clues.
Environment and tools I'm using:
+---------------+----------+
| Tools | Version |
+--------------------------+
| PostgreSQL | 9.4.1 |
| Ruby | 2.2.1p85 |
| Ruby on Rails | 4.1.9 |
| Apartment gem | 0.26.1 |
+---------------+----------+
As you can see I use Apartment for creating schemas in my multi-tenant rails application.
PostgreSQL system catalogs don't store the dates on which database objects were created. You can configure PostgreSQL to log more or less every SQL statement (log_statement setting), but you'd have had to do that beforehand.
You could create an event trigger and store the date of this event in a table. And example can be found here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With