Re: [sferac@bo.nettuno.it: Re: [HACKERS] BUG: NOT boolfield kills backend] - Mailing list pgsql-hackers

From Thomas G. Lockhart
Subject Re: [sferac@bo.nettuno.it: Re: [HACKERS] BUG: NOT boolfield kills backend]
Date
Msg-id 3606903D.930DC219@alumni.caltech.edu
Whole thread Raw
In response to [sferac@bo.nettuno.it: Re: [HACKERS] BUG: NOT boolfield kills backend]  (Christopher Oliver <oliver@fritz.traverse.net>)
List pgsql-hackers
> > ZV> create table t1 ( b bool );
> > ZV> insert into t1 values ( 'T' );
> > ZV> select not b from t1;
> > Wrong syntax.
> Not if he is trying to display the complement of a logical field
> rather than restrict a selection.

(I've lost who started this thread, so if it isn't "techguys" sorry for
the misdirection...)

It looks like "NOT anything" is pretty broken at the moment. However,
try

  select b is false from t1;

to get what you want. The only problem with this is that it would mask
NULL fields if you have any.

                  - Tom

pgsql-hackers by date:

Previous
From: "Thomas G. Lockhart"
Date:
Subject: Re: [sferac@bo.nettuno.it: Re: [HACKERS] BUG: NOT boolfield kills backend]
Next
From: Anand Surelia
Date:
Subject: Foreign Keys: check_primary_function