From: | David Fetter <david(at)fetter(dot)org> |
---|---|
To: | PG Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Immodest Proposal: pg_catalog.pg_ddl |
Date: | 2005-12-14 03:55:31 |
Message-ID: | 20051214035531.GD7463@fetter.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Folks,
I've been looking into ways to have a better idea--automatically--of
what's been going on in a database from a DDL level, and here's what
I've come up with so far. I'd much appreciate hearing suggestions
and/or brickbats on this.
The idea is to make a new table in pg_catalog called pg_ddl. This
would have the structure
CREATE TABLE pg_catalog.pg_ddl (
objoid oid NOT NULL, -- object's oid
objddl TEXT NOT NULL, -- raw text of DDL
objmodified TIMESTAMP WITH TIME ZONE
NOT NULL
DEFAULT CURRENT_TIMESTAMP -- pretty obvious ;)
);
For any given object, it would contain all the DDL successfully
executed + a timestamp, so it would be possible to get a history on
any or all DB objects (modulo DROP/CREATE). How hard would it be to
get the raw text of the DDL and hold onto it until the DDL either
succeeds or fails?
Cheers,
D
--
David Fetter david(at)fetter(dot)org http://fetter.org/
phone: +1 415 235 3778
Remember to vote!
From | Date | Subject | |
---|---|---|---|
Next Message | Premsun Choltanwanich | 2005-12-14 03:58:34 | Re: lo function changed in PostgreSQL 8.1.1 |
Previous Message | Dann Corbit | 2005-12-14 03:46:36 | Re: Which qsort is used |