Re: How to convert a binary filed to an integer field?

From: wei725(at)lycos(dot)com
To: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to convert a binary filed to an integer field?
Date: 2010-08-26 04:28:54
Message-ID: 10351336.215311282796934777.JavaMail.root@mail-zbox11.bo3.lycos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

You are right. I typed the message in hurry before I left home this morning. It is the boolean type. Thanks for your suggestion. The NULL value may not work for jdbc. On the application level, a fixed set of constants is used to represent the three status, which are converted into an integer.

----- Original Message -----
From: "Adrian Klaver" <adrian(dot)klaver(at)gmail(dot)com>
To: wei725(at)lycos(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Sent: Wednesday, August 25, 2010 12:45:21 PM GMT -08:00 US/Canada Pacific
Subject: Re: [GENERAL] How to convert a binary filed to an integer field?

On 08/25/2010 12:29 PM, wei725(at)lycos(dot)com wrote:
> I have an application in the product. Now, one status field needs to have three statuses instead of two. How to make a such change in PostgreSQL?
>

I am going to assume that by binary you mean boolean. If so it already
has three states NULL,True,False.

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message wstrzalka 2010-08-26 06:06:39 Re: Feature proposal
Previous Message Craig Ringer 2010-08-26 00:48:21 Re: Feature proposal