How to query by column names - Mailing list pgsql-sql

From Richard Ray
Subject How to query by column names
Date
Msg-id Pine.LNX.4.64.0701221612220.10491@rray.drdc.mstc.ms.gov
Whole thread Raw
Responses Re: How to query by column names
List pgsql-sql
This may be a simple but can I create a query such as

select (select attname from pg_attribute where attrelid = (select 
relfilenode from pg_class where relname = 't1') and attisdropped = 
false and attnum > 0) from t1;

I get
ERROR:  more than one row returned by a subquery used as an expression

Thanks
Richard


pgsql-sql by date:

Previous
From: "Aaron Bono"
Date:
Subject: Re: Schema sample
Next
From: Jeff Frost
Date:
Subject: Re: How to query by column names