Skip site navigation (1) Skip section navigation (2)

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

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Hunter Hillegas <lists(at)lastonepicked(dot)com>
Cc: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: PSql won't Let me Set Varchar Column to 'true'
Date: 2004-08-28 00:13:27
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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?
>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?

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(at)commandprompt(dot)com -
PostgreSQL Replicator -- production quality replication for PostgreSQL

In response to

pgsql-general by date

Next:From: Martijn van OosterhoutDate: 2004-08-28 00:25:15
Subject: Re: FK question
Previous:From: Doug McNaughtDate: 2004-08-28 00:08:11
Subject: Re: PSql won't Let me Set Varchar Column to 'true'

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group