Thank you Jon -- thats the exact sort of trick I was hoping for.
Cheers!
On Jun 7, 2007, at 6:36 PM, Jon Sime wrote:
Jonathan Vanasco wrote:
Does anyone have a trick to list all columns in a db ?
No trickery, just exploit the availability of the SQL standard
information_schema views:
In this query:
select n.nspname as table_schema, c.relname as table_name,
a.attname as column_name
from pg_catalog.pg_attribute a
join pg_catalog.pg_class c on ( a.attrelid = c.oid)
join pg_catalog.pg_namespace n on (c.relnamespace = n.oid)
where c.relkind in ('r',
On 07/06/07, Jon Sime <[EMAIL PROTECTED]> wrote:
Jonathan Vanasco wrote:
>
> Does anyone have a trick to list all columns in a db ?
No trickery, just exploit the availability of the SQL standard
information_schema views:
select table_schema, table_name, column_name
from information_s
On Thu, Jun 07, 2007 at 06:36:07PM -0400, Jon Sime wrote:
> select n.nspname as table_schema, c.relname as table_name,
> a.attname as column_name
> from pg_catalog.pg_attribute a
> join pg_catalog.pg_class c on (a.attrelid = c.oid)
> join pg_catalog.pg_namespace n on
Jonathan Vanasco wrote:
Does anyone have a trick to list all columns in a db ?
No trickery, just exploit the availability of the SQL standard
information_schema views:
select table_schema, table_name, column_name
from information_schema.columns
where table_schema not in ('pg_cat
Jonathan Vanasco ha escrito:
> Does anyone have a trick to list all columns in a db ?
SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan
Does anyone have a trick to list all columns in a db ?
I need to audit a few dbs to make sure column & table names are
adhering to our standard semantic syntax.
i figure there has to be an old pg-admin trick out there to display
a db like
%(tname)s . %(cname)
or some similar fo