Thanks, the syntax works fine on 7.3.2.
Note that "lower($table)" may not be desirable as you CAN create
mixed-case table and column names, for example...
CREATE TABLE "MixedCase" ( "MixedCase" serial );
On Sat, 22 Mar 2003, Lamar Owen wrote:
> I use the following query, which also gives the type of the column. $table is
> the table in question.
> SELECT a.attname, t.typname
> FROM pg_class c, pg_attribute a, pg_type t
> WHERE c.relname = lower($table)
> and a.attnum > 0 and a.attrelid = c.oid
> and a.atttypid = t.oid
> ORDER BY attname