Re: Binary data type with other output method - Mailing list pgsql-hackers

From Andreas 'ads' Scherbaum
Subject Re: Binary data type with other output method
Date
Msg-id 20071227161909.0e4ab24e@iridium.wars-nicht.de
Whole thread Raw
In response to Re: Binary data type with other output method  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Binary data type with other output method  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On Thu, 27 Dec 2007 08:52:15 -0500 Andrew Dunstan wrote:

> Andreas 'ads' Scherbaum wrote:
> > On Wed, 26 Dec 2007 20:20:59 -0500 Andrew Dunstan wrote:
> >
> > This PHP driver is in use since years, do you really expect they will
> > fix this bug and make thousands of applications fail? Everyone like
> > Mark who posted an example earlier would have to change the PHP code
> > if the variable is now a true/false boolean instead a 't'/'f' string.
> > No, i don't expect a bugfix here. Newer drivers like PDO seems to
> > behave correct but this will not help if you cannot use this driver.
> 
> I don't see why it couldn't be switchable behaviour, just as it is in 
> DBD::Pg.

Maybe because the PHP folks don't care so much? I don't know. Already
discussed this one on IRC but there's not so much love for fixing this
issue, as far as i can see.
Either i got: "MySQL does this right in returning 0/1, so we don't
care" or i got "other drivers fixed this problem, use this one".


> > i considered this one but this would only bring 0/1 as input, not as
> > output values, which is what i want.
> 
> er, what? This domain would have input and output values of 0/1.

Yes, but i will loose 't', 'true', 'f' and 'false', the usual input
values in PostgreSQL beside '0' and '1'. It's not that the people don't
use true/false, they use this a lot. But they expect boolean variable
in PHP working like a bolean column in PG ... without casts, without
extra workarounds in the code.


Kind regards

--             Andreas 'ads' Scherbaum
German PostgreSQL User Group


pgsql-hackers by date:

Previous
From: "Joris Dobbelsteen"
Date:
Subject: Re: Sorting Improvements for 8.4
Next
From: Tom Lane
Date:
Subject: Unworkable column delimiter characters for COPY