Re: TODO: Add pg_get_acldef(), pg_get_typedefault(), pg_get_attrdef(), - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: TODO: Add pg_get_acldef(), pg_get_typedefault(), pg_get_attrdef(),
Date
Msg-id 20060612190013.GC4035@alvh.no-ip.org
Whole thread Raw
In response to Re: TODO: Add pg_get_acldef(), pg_get_typedefault(), pg_get_attrdef(),  ("Joshua D. Drake" <jd@commandprompt.com>)
List 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).


pgsql-hackers by date:

Previous
From: Zoltan Boszormenyi
Date:
Subject: Re: Extended SERIAL parsing
Next
From: "Jim C. Nasby"
Date:
Subject: Re: CSV mode option for pg_dump