
Hi, 
I just found an error in every postgres versions, 
(I tried 6.2.1, 6.3.2, and 6.4beta1 )

if I have a table with boolean field, and I want to negate that field,
it's kills the backend process... meanwhile 'select not ( 'T'::bool )'
works well...

create table t1 ( b bool );
insert into t1 values ( 'T' );

select not b from t1;
PQexec() -- Request was sent to backend, but backend closed the channel
before responding.
        This probably means the backend terminated abnormally before or
while processing the request.

	don't you have some idea what to do,?
	
	thanks, 
		Redax
.----------------------------------------------------------.
|Zsolt Varga            | tel/fax:   +36 36 422811         |
| AgriaComputer LTD     | email:     redax@agria.hu        |
| System Administrator  | URL:       http://www.agria.hu/  |
`----------------------------------------------------------'


Fri, 18 Sep 1998 12:39:16 +0200 (CEST)
Zsolt Varga <redax@agria.hu>
BUG: NOT boolfield kills backend
Hello Zsolt,

venerdï¿½, 18 settembre 98, you wrote:


ZV> Hi, 
ZV> I just found an error in every postgres versions, 
ZV> (I tried 6.2.1, 6.3.2, and 6.4beta1 )

ZV> if I have a table with boolean field, and I want to negate that field,
ZV> it's kills the backend process... meanwhile 'select not ( 'T'::bool )'
ZV> works well...

ZV> create table t1 ( b bool );
ZV> insert into t1 values ( 'T' );

ZV> select not b from t1;

Wrong syntax.
The logical operator must be used in WHERE condition.
Try this:  SELECT b FROM t1 WHERE NOT b;
It works! ;)

Jose'



Fri, 18 Sep 1998 14:54:23 +0200
Sferacarta Software <sferac@bo.nettuno.it>
Re: [HACKERS] BUG: NOT boolfield kills backend
On Fri, 18 Sep 1998, Sferacarta Software wrote:

|ZV> create table t1 ( b bool );
|ZV> insert into t1 values ( 'T' );
|
|ZV> select not b from t1;
|
|Wrong syntax.
|The logical operator must be used in WHERE condition.
|Try this:  SELECT b FROM t1 WHERE NOT b;
|It works! ;)
yes, but what I want is to list every touple, 
and negate the bool field from 'T' -> 'F' and vica verse

	thanks.

	redax

.----------------------------------------------------------.
|Zsolt Varga            | tel/fax:   +36 36 422811         |
| AgriaComputer LTD     | email:     redax@agria.hu        |
| System Administrator  | URL:       http://www.agria.hu/  |
`----------------------------------------------------------'


Sat, 19 Sep 1998 15:10:53 +0200 (CEST)
Zsolt Varga <redax@agria.hu>
Re: [HACKERS] BUG: NOT boolfield kills backend
Fixed.

> 
> Hi, 
> I just found an error in every postgres versions, 
> (I tried 6.2.1, 6.3.2, and 6.4beta1 )
> 
> if I have a table with boolean field, and I want to negate that field,
> it's kills the backend process... meanwhile 'select not ( 'T'::bool )'
> works well...
> 
> create table t1 ( b bool );
> insert into t1 values ( 'T' );
> 
> select not b from t1;
> PQexec() -- Request was sent to backend, but backend closed the channel
> before responding.
>         This probably means the backend terminated abnormally before or
> while processing the request.
> 
> 	don't you have some idea what to do,?
> 	
> 	thanks, 
> 		Redax
> .----------------------------------------------------------.
> |Zsolt Varga            | tel/fax:   +36 36 422811         |
> | AgriaComputer LTD     | email:     redax@agria.hu        |
> | System Administrator  | URL:       http://www.agria.hu/  |
> `----------------------------------------------------------'
> 
> 
> 


-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
http://www.op.net/~candle              |  (610) 353-9879(w)
  +  If your life is a hard drive,     |  (610) 853-3000(h)
  +  Christ can be your backup.        |

Tue, 22 Sep 1998 17:21:11 -0400 (EDT)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] BUG: NOT boolfield kills backend