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

From: Peter Geoghegan <peter(dot)geoghegan86(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
Cc: wei725(at)lycos(dot)com, pgsql-general(at)postgresql(dot)org
Subject: Re: How to convert a binary filed to an integer field?
Date: 2010-08-25 19:58:31
Message-ID: AANLkTi=HtqOBDZPHzSPgHb=VYnwQRyrCunxcgRZdkP3A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Uh, not really, no. NULL indicates the absence or indeterminacy of a
state, and has a number of properties that make it unsuitable for
representing anything other than that.

Use an enum.

--
Regards,
Peter Geoghegan

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Oleg Bartunov 2010-08-25 20:08:06 Re: Differences between to_tsquery() and plainto_tsquery() when it comes to applying an index?
Previous Message Adrian Klaver 2010-08-25 19:45:21 Re: How to convert a binary filed to an integer field?