SELECT <all fields except "bad_field"> from mytbl;

From: brsaweda(at)gmail(dot)com
To: pgsql-general(at)postgresql(dot)org
Subject: SELECT <all fields except "bad_field"> from mytbl;
Date: 2007-05-29 22:42:53
Message-ID: 1180478573.299145.272060@q69g2000hsb.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi!

Title says it pretty much. I am wondering if there is a short way to
form a query that retrieves all fields of a table (of which I do not
know names and number beforehand) except for one (or more, of which I
know the name(s)). I have stumbled across the need for this a couple
of time during the last few years. Maybe there is a way and I am just
being blind ..

For instance, I would use this in a plpgsql function to select all
fields but "bad_field" from a number of tables. I know the name of the
field I DO NOT want, but number and names of the other fields (which I
want) are not known at the time of writing the function.

Thanx for your hints and please cc answers to my email.

Regards
Erwin

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Glaesemann 2007-05-29 22:46:45 Re: Geographic data sources, queries and questions
Previous Message Michael Glaesemann 2007-05-29 22:36:14 Re: Geographic data sources, queries and questions