Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id A01869FA21A for ; Wed, 24 Jan 2007 11:53:51 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 24531-04 for ; Wed, 24 Jan 2007 11:53:36 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from community1.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id AD5249FB22C for ; Wed, 24 Jan 2007 11:53:36 -0400 (AST) Received: from [192.168.27.150] (unknown [12.38.10.44]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by community1.commandprompt.com (Postfix) with ESMTP id 56188246DC1; Wed, 24 Jan 2007 07:53:34 -0800 (PST) Message-ID: <45B780FB.4010509@dunslane.net> Date: Wed, 24 Jan 2007 10:53:31 -0500 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.6) Gecko/20060804 Fedora/1.0.4-0.5.1.fc5 SeaMonkey/1.0.4 MIME-Version: 1.0 To: Tom Lane CC: FAST PostgreSQL , Neil Conway , PostgreSQL-development Subject: Re: [pgsql-patches] pg_get_domaindef References: <12753.10901169180733.fast.fujitsu.com.au@MHS> <22604.10061169615735.fast.fujitsu.com.au@MHS> <45B76AE7.3090308@dunslane.net> <482.1169652329@sss.pgh.pa.us> In-Reply-To: <482.1169652329@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/1137 X-Sequence-Number: 97038 [ redirecting discussion to -hackers, where it seems more appropriate ] Tom Lane wrote: > Andrew Dunstan 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... > > > I agree entirely. I'm not sure how big the refactoring would be, but I do think it's a good goal. Neil mentioned something about it the other day. It is a worry though that we have an item on the TODO list that has been worked on and now we might say "Thanks, but no thanks". That's not a good way to make friends for PostgreSQL. This is why I think we need the TODO list to be somewhat authoritative, i.e. a list of things that we have some sort of consensus about doing and commitment to accepting, at least in principle. cheers andrew