Re: How to convert a binary filed to an integer field? - Mailing list pgsql-general

From Merlin Moncure
Subject Re: How to convert a binary filed to an integer field?
Date
Msg-id AANLkTin2-7gWHLvg_isSSVXyirA9572-i9=yv0kNEU1D@mail.gmail.com
Whole thread Raw
In response to Re: How to convert a binary filed to an integer field?  (wei725@lycos.com)
List pgsql-general
On Thu, Aug 26, 2010 at 12:28 AM,  <wei725@lycos.com> wrote:
> 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
representthe three status, which are converted into an integer. 

TBH, you are probably best off taking those constants and writing them
directly into the database (unless they happen to be dictionary
pages), and applying a check constraint or using referential integrity
to match against the known list.

merlin

pgsql-general by date:

Previous
From: Sam Mason
Date:
Subject: Re: Feature proposal
Next
From: Vick Khera
Date:
Subject: Re: Feature proposal