From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, 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(), pg_get_attrdef(), |
Date: | 2006-06-12 19:00:13 |
Message-ID: | 20060612190013.GC4035@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Joshua D. Drake wrote:
> What is easier?
>
> test=# select column_name, data_type from columns where table_schema !=
> 'pg_catalog' and table_name = 'email';
\d email
So, would you change psql's \d logic to use the new function? While
answering that, consider that you'd lose the ability to query old
servers that don't have the function.
And before you argue that this is psql-specific, consider that the
(e.g.) pgAdmin developers already use a query to display table
information; what would be the purpose of changing that query? What use
would be for users to be able to call a function in pgAdmin's query
tool, when they can get the result more easily by using the specific
show-me-the-table feature?
Your query is wrong schema-wise anyway, because it'll mix the columns
from any table named email in any schema (except the only one where it's
pretty unlikely that there'll be a table named email).
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Stark | 2006-06-12 19:01:48 | Re: ADD/DROP INHERITS |
Previous Message | Zoltan Boszormenyi | 2006-06-12 18:32:55 | Re: Extended SERIAL parsing |