Skip site navigation (1) Skip section navigation (2)

Re: Binary data type with other output method

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Andreas 'ads' Scherbaum <adsmail(at)wars-nicht(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Binary data type with other output method
Date: 2007-12-27 01:20:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

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 TRUE in PHP.
> I was begged many times by our people coding PHP to find a workaround
> for this problem.

The answer is surely to fix the PHP driver rather than trying to mangle 
Postgres. The Perl DBD::Pg driver does not suffer this problem, so it 
can certainly be worked around (in fact in DBD::Pg you get a choice if 
1/0 or t/f values for booleans).



In response to


pgsql-hackers by date

Next:From: Tomasz OstrowskiDate: 2007-12-27 10:09:06
Subject: Re: Spoofing as the postmaster
Previous:From: Andreas 'ads' ScherbaumDate: 2007-12-26 22:28:39
Subject: Re: Binary data type with other output method

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group