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

From Cedric Boudin
Subject Re: simple update on boolean
Date
Msg-id 4757ED47.2010700@dreamgnu.com
Whole thread Raw
In response to simple update on boolean  (Cedric Boudin <cedric@dreamgnu.com>)
Responses Re: simple update on boolean
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;
>
> or join me in the dark forest
>
> cedric
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
>                http://archives.postgresql.org/
>
It was indeed a forest problem.
both:

set bolean_column= not bolean_column
and
set bolean_column= case when bolean_column then 'f'::bool else 't'::bool
end;

do work perfectly.

Thks for bringing me the light in the forest.
working late isn't that effective !!!

cedric


pgsql-general by date:

Previous
From: "Usama Dar"
Date:
Subject: Re: libpq messages language
Next
From: SHARMILA JOTHIRAJAH
Date:
Subject: Re: WAL shipping question