Re: SQL statement : list table details

From: "Dino Hoboloney" <whatever(at)whatever(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: SQL statement : list table details
Date: 2002-03-04 21:23:20
Message-ID: a60ok0$noq$1@jupiter.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

think I answered my own question ....

SELECT a.attnum, a.attname AS field, a.atttypid AS column_type, a.atttypmod
AS type_specific, c.relname AS table_name FROM pg_class c, pg_attribute a
WHERE c.relname NOT LIKE 'pg%' AND relkind = 'r' AND a.attnum > 0 AND
a.attrelid = c.oid ORDER BY table_name, attnum;

this will now list column_type, and type_specific which is type-specific
data such as varchar length.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Oliver Elphick 2002-03-04 21:35:43 Re: Help with SET TRANSACTION in a function
Previous Message Ron Snyder 2002-03-04 20:49:13 trying to upgrade and keep large object IDs intact...