Thread: DBI support for pg native arrays?

DBI support for pg native arrays?

From
Louis-David Mitterrand
Date:
Hello,

For a "select array(...) as col1, col2, col3 from table" I'd like the DBI
driver to output col1 as a perl array instead of a scalar
"{res1,res2,etc.}" representation of it.

Is that somehow possible? I looked at the docs without finding anything.

Thanks,

Re: DBI support for pg native arrays?

From
Martijn van Oosterhout
Date:
On Fri, Jan 26, 2007 at 12:00:42PM +0100, Louis-David Mitterrand wrote:
> Hello,
>
> For a "select array(...) as col1, col2, col3 from table" I'd like the DBI
> driver to output col1 as a perl array instead of a scalar
> "{res1,res2,etc.}" representation of it.
>
> Is that somehow possible? I looked at the docs without finding anything.

That would involve the DBI driver converting it, since it's just
returning what the server returns...

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment

Re: DBI support for pg native arrays?

From
"Greg Sabino Mullane"
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160


> For a "select array(...) as col1, col2, col3 from table" I'd like the DBI
> driver to output col1 as a perl array instead of a scalar
> "{res1,res2,etc.}" representation of it.
>
> Is that somehow possible? I looked at the docs without finding anything.

It is not currently possible, but it is being worked on as part of the next
version of DBD::Pg.

- --
Greg Sabino Mullane greg@turnstep.com
End Point Corporation
PGP Key: 0x14964AC8 200701301513
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iD8DBQFFv6cFvJuQZxSWSsgRA1VIAJ4uMKHQkIWOhwzUB2Z4hbzy++lNzQCeLQfV
ascTtxEn/6oNXgnomuycJXc=
=CQQ/
-----END PGP SIGNATURE-----