On May 29, 5:42 pm, brsaw(dot)(dot)(dot)(at)gmail(dot)com wrote:
> 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.
create table my_t (
, good_field2 int
, bad_field int
where table_name = 'my_t';
where table_name = 'my_t'
and column_name <> 'bad_field';
In response to
pgsql-general by date
|Next:||From: novnov||Date: 2007-05-30 00:18:42|
|Subject: function retuning refcursor, order by ignored?|
|Previous:||From: Alvaro Herrera||Date: 2007-05-29 23:58:09|
|Subject: Re: TimeZone List|