Re: character varying as boolean !!! help

From: Richard Huxton <dev(at)archonet(dot)com>
To: Francesco Andreozzi <francesco(dot)andreozzi(at)proxime(dot)it>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: character varying as boolean !!! help
Date: 2005-01-13 13:44:25
Message-ID: 41E67B39.3050704@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2005-01-13 15:25:56 Re: rc4 and rc3, some deleted, but still needed text in the
Previous Message Alvaro Herrera 2005-01-13 12:54:13 Re: character varying as boolean !!! help