Skip site navigation (1) Skip section navigation (2)

Re: pg_get_domaindef

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: FAST PostgreSQL <fastpgs(at)fast(dot)fujitsu(dot)com(dot)au>, Neil Conway <neilc(at)samurai(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: pg_get_domaindef
Date: 2007-01-24 15:25:29
Message-ID: 482.1169652329@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> FAST PostgreSQL wrote:
>> Please find attached the patch with modifications

> are you proposing to implement the other functions in this TODO item 
> (pg_get_acldef(), pg_get_typedefault(), pg_get_attrdef(), 
> pg_get_tabledef(), pg_get_functiondef() ) ?

I haven't entirely understood the use case for any of these.  It's not
pg_dump, for a number of reasons: one being that pg_dump still has to
support older backend versions, and another being that every time we
let backend SnapshotNow functions get involved, we take another hit to
pg_dump's claim to produce a consistent MVCC snapshot.

But my real objection is: do we really want to support duplicative code
in both pg_dump and the backend?  Updating pg_dump is already a major
PITA whenever one adds a new feature; doubling that work isn't
attractive.  (And it'd be double, not just a copy-and-paste, because of
the large difference in the operating environment.)  So I want to hear a
seriously convincing use-case that will justify the maintenance load we
are setting up for ourselves.  "Somebody might want this" is not
adequate.

Perhaps a better area of work would be the often-proposed refactoring of
pg_dump into a library and driver program, wherein the library could
expose individual functions such as "fetch the SQL definition of this
object".  Unfortunately, that'll be a huge project with no payoff until
the end...

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2007-01-24 15:53:31
Subject: Re: [pgsql-patches] pg_get_domaindef
Previous:From: Theo SchlossnagleDate: 2007-01-24 15:17:00
Subject: Re: About PostgreSQL certification

pgsql-patches by date

Next:From: Andrew DunstanDate: 2007-01-24 15:53:31
Subject: Re: [pgsql-patches] pg_get_domaindef
Previous:From: Andrew DunstanDate: 2007-01-24 14:19:19
Subject: Re: pg_get_domaindef

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group