Search Postgresql Archives

Re: array_agg and libpq(xx)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2009/3/19 John R Pierce <pierce@xxxxxxxxxxxx>:
>   pgResult = PQexec(pgConn, "select array['123','456','abc','def'];");
>   pgarray = PQgetvalue(pgResult,0,0);
>
> will return a pointer to the ARRAY in postgres format as defined by the
> typsend/recieve internal functions for the ARRAY type.   you would need to
> walk this and copy the strings comprising the array to your own managed
> storage (malloc, or whatever) prior to calling PQclear(pgResult).   I'm
> trying to find the docs on what the typsend format for ARRAY looks like and
> failing.

Clearly looking like libpqq(xx) are missing that functionality built
in to protocol/api...



-- 
GJ

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux