Immodest Proposal: pg_catalog.pg_ddl

Поиск
Список
Период
Сортировка
От David Fetter
Тема Immodest Proposal: pg_catalog.pg_ddl
Дата
Msg-id 20051214035531.GD7463@fetter.org
обсуждение исходный текст
Ответы Re: Immodest Proposal: pg_catalog.pg_ddl  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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
objmodifiedTIMESTAMP 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@fetter.org http://fetter.org/
phone: +1 415 235 3778

Remember to vote!


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Dann Corbit"
Дата:
Сообщение: Re: Which qsort is used
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Immodest Proposal: pg_catalog.pg_ddl