On Tue, 3 Mar 2009, Merrill Oveson wrote:
I'm using postgres.
I need to know when tables are created.
I couldn't find anything in the pg_catalog views -e.g view
pg_stat_user_tables.
Anybody out there know of a solution?
I don't know of a nice solution, because I don't think the system tables
track that and you can't put triggers on the system tables to add your own
tracking.
You can gather some information from matching the OID to the actual files
in the data directory, but that's pretty grubby and would really only be
useful for watching the data directory for new files and reverse
engineering what tables were created.
Another possibility is logging your DDL statements, and archiving the
table create time from there with an out-of-band process.
All of which is pretty lame and probably isn't what you were hoping for.
Sorry. :)
Jon
--
Jon Jensen
End Point Corporation
http://www.endpoint.com/
/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/