Re: [HACKERS] Binary data type with other output method

2007-12-26 Thread Andrew Dunstan
Andreas 'ads' Scherbaum wrote: The reason for my question is: PHP (yes *grumble*) does not recognize boolean columns but instead makes a simple string from a PG boolean. So every time you select a boolean column in PHP, you cannot use expressions like: if (!$bool) because 't' and 'f' give TR

Re: [HACKERS] Binary data type with other output method

2007-12-26 Thread Andreas 'ads' Scherbaum
On Wed, 26 Dec 2007 17:12:33 -0500 Mark Mielke wrote: > Andreas 'ads' Scherbaum wrote: > > The reason for my question is: PHP (yes *grumble*) does not recognize > > boolean columns but instead makes a simple string from a PG boolean. > > > > So every time you select a boolean column in PHP, you ca

Re: [HACKERS] Binary data type with other output method

2007-12-26 Thread Mark Mielke
Andreas 'ads' Scherbaum wrote: On Tue, 25 Dec 2007 20:11:45 -0500 Tom Lane wrote Andrew Dunstan <[EMAIL PROTECTED]> writes: I think you'd really need a separate type. But have you considered something simple like CREATE DOMAIN boolint AS int CHECK (value = 0 OR value = 1) i consid

Re: [HACKERS] Binary data type with other output method

2007-12-26 Thread Andreas 'ads' Scherbaum
Hello, On Tue, 25 Dec 2007 20:11:45 -0500 Tom Lane wrote: > Andrew Dunstan <[EMAIL PROTECTED]> writes: > I think you'd really need a separate type. But have you considered > something simple like > CREATE DOMAIN boolint AS int CHECK (value = 0 OR value = 1) i considered this one but this