Re: PSql won't Let me Set Varchar Column to 'true'

Поиск
Список
Период
Сортировка
От Joshua D. Drake
Тема Re: PSql won't Let me Set Varchar Column to 'true'
Дата
Msg-id 412FCE27.2080302@commandprompt.com
обсуждение исходный текст
Ответ на PSql won't Let me Set Varchar Column to 'true'  (Hunter Hillegas <lists@lastonepicked.com>)
Список pgsql-general
Hunter Hillegas wrote:

>I have two varchars on my table...
>
>I tried to run the following:
>
>VMGEngine=# update user_account set editor_status = 'true' and
>administrator_status = 'true' where rec_num = 20;
>ERROR:  column "editor_status" is of type character varying but expression
>is of type boolean
>
>

That is kind of weird... you could probably cast it...

editor_status = 't


>I was expecting the single quotes to tell psql to treat the data as a
>string, not a constant boolean value.
>
>Can I coerce psql to do what I would like it to?
>
>Hunter
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?
>
>               http://archives.postgresql.org
>
>


--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd@commandprompt.com - http://www.commandprompt.com
PostgreSQL Replicator -- production quality replication for PostgreSQL


В списке pgsql-general по дате отправления:

Предыдущее
От: Doug McNaught
Дата:
Сообщение: Re: PSql won't Let me Set Varchar Column to 'true'
Следующее
От: Bjørn T Johansen
Дата:
Сообщение: Introducing another primary key field?