From: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, 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:21:14 |
Message-ID: | 448CA56A.8020009@commandprompt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>>
>
>
> Well, I certainly don't think a setof <name, type> is adequate for
> pg_get_tabledef(). What about constraints? And what you are suggesting
> can probably be got by very simple queries against either the catalog or
> the information schema, and seems to me to have little value.
Well it isn't simple queries because they aren't documented. It is a lot
easier to say, select pg_get_tabledesc('foo') then a select with 3
different joins and a couple of where clauses (I actually don't think it
is that bad. I have a query that does it.) What I am suggesting is that
we have a standard way for APIs to get information that they need.
The information doesn't need to be limited to just the name and type, we
could add cosntraint info. I am not against that at all.
Anyway, I suggest having both functions. One that will spit out the
actual create information, and the other set that gives user space
usable information.
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/
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua D. Drake | 2006-06-11 23:24:31 | Re: TODO: Add pg_get_acldef(), pg_get_typedefault(), pg_get_attrdef(), |
Previous Message | Zoltan Boszormenyi | 2006-06-11 23:03:57 | Re: Extended SERIAL parsing |