Re: Binary data type with other output method

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Binary data type with other output method
Дата
Msg-id 4772FDFB.9010207@dunslane.net
обсуждение исходный текст
Ответ на Re: Binary data type with other output method  (Andreas 'ads' Scherbaum <adsmail@wars-nicht.de>)
Ответы Re: Binary data type with other output method  (Andreas 'ads' Scherbaum <adsmail@wars-nicht.de>)
Список 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).

cheers

andrew



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andreas 'ads' Scherbaum
Дата:
Сообщение: Re: Binary data type with other output method
Следующее
От: Tomasz Ostrowski
Дата:
Сообщение: Re: Spoofing as the postmaster