Re: simple update on boolean

Поиск
Список
Период
Сортировка
От Cedric Boudin
Тема Re: simple update on boolean
Дата
Msg-id 4757ED47.2010700@dreamgnu.com
обсуждение исходный текст
Ответ на simple update on boolean  (Cedric Boudin <cedric@dreamgnu.com>)
Ответы Re: simple update on boolean  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
Список 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 по дате отправления:

Предыдущее
От: "Usama Dar"
Дата:
Сообщение: Re: libpq messages language
Следующее
От: SHARMILA JOTHIRAJAH
Дата:
Сообщение: Re: WAL shipping question