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). ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match