Re: TODO: Add pg_get_acldef(), pg_get_typedefault(),

From: Mark Kirkwood <markir(at)paradise(dot)net(dot)nz>
To: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: TODO: Add pg_get_acldef(), pg_get_typedefault(),
Date: 2006-06-12 05:21:19
Message-ID: 448CF9CF.7000509@paradise.net.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jim C. Nasby wrote:
> On Mon, Jun 12, 2006 at 03:47:13PM +1200, Mark Kirkwood wrote:
>> Keeping 'em separate makes sense to me:
>>
>> 1/ API (or info schema views) provides the required data (e.g column
>> details for a table).
>> 2/ client (e.g. pg_dump) decides what to do with it (e.g. construct a
>> CREATE statement from the column details).
>
> Which means that every other client that wants to generate DDL
> statements has to go through a lot of work to get it right. And then
> they have to maintain it for every version of PostgreSQL.
>
> I think it makes a heck of a lot more sense to have a backend function
> to do this.
>
> Here's the relevant thread:
> http://archives.postgresql.org/pgsql-hackers/2005-12/msg00756.php
>
> The intention is to flesh out the existing pg_get_blahdef functions,
> such as pg_get_viewdef(). This clearly means that the functions should
> output a complete CREATE command.
>

Ok, good point, if I'm writing some admin or data movement package, then
these guys would be great!

I guess a possible compromise for those who want to keep the core
backend lean is to implement pg_get_blahdef (and friends) in a contrib
module similar to (or part of) the adminpack stuff.

This would mean that pg_dump would *not* use them - but if I've followed
this thread properly, that may be fine.

Best wishes

Mark

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Aaron Bingham 2006-06-12 09:08:55 Re: Fabian Pascal and RDBMS deficiencies in fully implementing
Previous Message Kris Kennaway 2006-06-12 04:24:36 Re: postgresql and process titles