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

From Peter Geoghegan
Subject Re: How to convert a binary filed to an integer field?
Date
Msg-id AANLkTi=HtqOBDZPHzSPgHb=VYnwQRyrCunxcgRZdkP3A@mail.gmail.com
Whole thread Raw
In response to Re: How to convert a binary filed to an integer field?  (Adrian Klaver <adrian.klaver@gmail.com>)
List 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

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: How to convert a binary filed to an integer field?
Next
From: Oleg Bartunov
Date:
Subject: Re: Differences between to_tsquery() and plainto_tsquery() when it comes to applying an index?