Re: character varying as boolean !!! help - Mailing list pgsql-bugs

From Richard Huxton
Subject Re: character varying as boolean !!! help
Date
Msg-id 41E67B39.3050704@archonet.com
Whole thread Raw
In response to character varying as boolean !!! help  ("Francesco Andreozzi" <francesco.andreozzi@proxime.it>)
List pgsql-bugs
Francesco Andreozzi wrote:
>
> if I try to insert something it works.... but the update no....
>
> sportellounico=# UPDATE cfp SET testo='test' AND cod_procedimento='82' where
> cod_cfp='2';
> ERROR:  invalid input syntax for type boolean: "test"

The error message is misleading you here. You want a comma not AND
above. The parser is reading that as:

UPDATE cfp SET testo=('test' AND cod_procedimento='82')

--
   Richard Huxton
   Archonet Ltd

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: character varying as boolean !!! help
Next
From: Tom Lane
Date:
Subject: Re: rc4 and rc3, some deleted, but still needed text in the