Re: Binary data type with other output method

From: Andreas 'ads' Scherbaum <adsmail(at)wars-nicht(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Binary data type with other output method
Date: 2007-12-27 15:19:09
Message-ID: 20071227161909.0e4ab24e@iridium.wars-nicht.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-12-27 15:37:07 Unworkable column delimiter characters for COPY
Previous Message Joris Dobbelsteen 2007-12-27 14:42:57 Re: Sorting Improvements for 8.4