From: Jasen Betts <jasen@xnet.co.nz>
To: pgsql-php@postgresql.org
Subject: Re: PDO, postgre and PHP data types
Date: 26 May 2009 11:57:40 GMT
Message-ID: <gvglfk$8vs$5@reversiblemaps.ath.cx> (raw)
References: <1243278537.18371.16.camel@localhost.localdomain>
On 2009-05-25, Developer <dev002@pas-world.com> wrote:
> Hello,
> I have some problem with data type of PDO returned instance, array of
> integer (_int4[]) is returned as string.
yes.
> I read ref.pgsql.php, but nothing said how solve this problem.
> I use something like this for it:
> $dat=array($k=>explode(',',trim($v,'{}'))); // One dimension array
> But it is very slow. Any method to return correct data types from
> DATABASE to PHP parsed with high speed code (like C)?
php will never be "fast like c"
if you are not using the arrays with postgres stored procedures,
perhaps you could store them in a format that PHP is handles better
(eg: serialize)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: jasen@xnet.co.nz
Subject: Re: PDO, postgre and PHP data types
In-Reply-To: <gvglfk$8vs$5@reversiblemaps.ath.cx>
References: <1243278537.18371.16.camel@localhost.localdomain> <gvglfk$8vs$5@reversiblemaps.ath.cx>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox