PHP and PostgreSQL boolean data type

Поиск
Список
Период
Сортировка
От Thom Brown
Тема PHP and PostgreSQL boolean data type
Дата
Msg-id bddc86151002100404o76e1acc9r469d82a49284b7b5@mail.gmail.com
обсуждение исходный текст
Ответы Re: PHP and PostgreSQL boolean data type  (Chris <dmagick@gmail.com>)
Список pgsql-php
Hi,

A long-standing problem we've had with PostgreSQL queries in PHP is
that the returned data for boolean columns is the string 'f' instead
of the native boolean value of false.

An obvious example of this would be for a table with users and their
boolean registered status:

Select user, registered From users;

Then getting a row from the result would reveal: array('user' =>
'thomb', registered => 'f');

Another problem is with arrays, where they are difficult to parse as
they also come through as plain strings with no binary alternative.

 Is this a limitation of libpq or a flawed implementation in the php
library?  And if this is just the case for backwards-compatibility, is
there a way to switch it to a more sensible PHP data type?

Thanks

Thom

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

Предыдущее
От: Gustavo Amarilla Santacruz
Дата:
Сообщение: Re: Undefined function pg_connect()
Следующее
От: Chris
Дата:
Сообщение: Re: PHP and PostgreSQL boolean data type