Re: Immodest Proposal: pg_catalog.pg_ddl - Mailing list pgsql-hackers

From David Fetter
Subject Re: Immodest Proposal: pg_catalog.pg_ddl
Date
Msg-id 20051214044310.GE7463@fetter.org
Whole thread Raw
In response to Re: Immodest Proposal: pg_catalog.pg_ddl  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Immodest Proposal: pg_catalog.pg_ddl  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Dec 13, 2005 at 11:33:20PM -0500, Tom Lane wrote:
> David Fetter <david@fetter.org> writes:
> > The idea is to make a new table in pg_catalog called pg_ddl.
> 
> This seems rather poorly thought out --- I can't even tell whether
> your intention is to make a log of past operations,

Yes.

> or to provide a uniform way to extract the current definition of
> every object.  If the latter, recording text won't do it.  If the
> former, the notion that all DDL can be uniquely keyed to one object
> OID is bogus,

What could it be keyed to, then?

> and I don't even see the argument for doing it via a table rather
> than via the postmaster log.

Simple.  Postmaster logs can roll over or otherwise be lost without
damaging the DB.  This would provide a non-volatile log of DDLs.

It occurs to me that the creator's or in the case of ALTER, the
modifier's, rolename and oid should be along.

Thanks for the feedback :)

Cheers,
D
-- 
David Fetter david@fetter.org http://fetter.org/
phone: +1 415 235 3778

Remember to vote!


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Immodest Proposal: pg_catalog.pg_ddl
Next
From: "Premsun Choltanwanich"
Date:
Subject: Re: lo function changed in PostgreSQL 8.1.1