>>
>
>
> 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/