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

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: TODO: Add pg_get_acldef(), pg_get_typedefault(), pg_get_attrdef(),
Date: 2006-06-11 23:24:31
Message-ID: 448CA62F.9020301@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


>> CREATE TABLE foo (id serial);
>>
>> I mean, I can do either but I would like to get a clear definition of
>> what we are looking for here. Maybe:
>>
>> pg_get_tabledef is the actual SQL and pg_get_tabledesc() is the column,
>> datatype output?
>>
>> I guess I don't see the advantage of putting pg_dump -s -t in the backend.
>
> If all you want is column, datatype, why not just use info_schema, or
> newsysviews? Or even the base catalogs?

Where do I look in the info_schema? How do I know exactly what I need?
What is newsysviews?

Of course I know the answers to these but many people don't. Newsysviews
is a no-op unless it is in the backend (will it be for 8.2?). Secondly
in a email I just sent I did say we can add anything we want, but the
CREATE TABLE statement doesn't seem that useful.

I will create either or both I don't really care :).

> ISTM what would be of the most value is a way to get the actual DDL you
> need to create the table (which includes a heck of a lot more than just
> column names and data types).

Name and datatype was just an example. I am trying to get people to
actually provide feedback (thank you). Andrew brought up that also
including the constraints would be a good idea which I agree.

Joshua D. Drake

--

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-06-11 23:43:03 Re: postgresql and process titles
Previous Message Joshua D. Drake 2006-06-11 23:21:14 Re: TODO: Add pg_get_acldef(), pg_get_typedefault(), pg_get_attrdef(),