Re: simple update on boolean

From: Daniel Drotos <drdani(at)mazsola(dot)iit(dot)uni-miskolc(dot)hu>
To: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: simple update on boolean
Date: 2007-12-06 09:47:12
Message-ID: Pine.LNX.4.64.0712061045520.10008@mazsola.iit.uni-miskolc.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 6 Dec 2007, A. Kretschmer wrote:

> update table set bolean_column = set_it_to_its_inverse where fk =
> some_value;

I've used:

update table set bolean_column = not boolean_column where fk =
some_value;

which has worked for me well.

Daniel

In response to

Browse pgsql-general by date

  From Date Subject
Next Message luca.ciciriello 2007-12-06 09:55:12 Orthodox use of PQtransactionStatus
Previous Message A. Kretschmer 2007-12-06 09:36:01 Re: simple update on boolean