Re: simple update on boolean - Mailing list pgsql-general

From Frank Millman
Subject Re: simple update on boolean
Date
Msg-id 20071206101021.009B33F438D@fcserver.chagford.com
Whole thread Raw
In response to simple update on boolean  (Cedric Boudin <cedric@dreamgnu.com>)
List pgsql-general
Cedric Boudin wrote:
>
> Most honourable members of the list,
>
> this is a simple one, but I can't find the solution (
> probably a forest/tree problem).
>
> update table set bolean_column = set_it_to_its_inverse where
> fk = some_value;
>

I am usually a newbie around here, but this is one that I can answer :-)

update table set boolean_column = not boolean_column where fk = some_value

HTH

Frank Millman


pgsql-general by date:

Previous
From: luca.ciciriello@email.it
Date:
Subject: Orthodox use of PQtransactionStatus
Next
From: "Albe Laurenz"
Date:
Subject: Re: Import LDAP data to a Postgres database