Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: libpq PQexecParams and arrays



Keary Suska <hierophant(at)pcisys(dot)net> writes:
> To make sure that I understand, do you mean passing a paramValues as an
> array of uint32, or passing values to a *column* that is an array column? If
> it's the latter (array column), I don't think libpq supports array columns
> in this way.

If you're trying to pass a binary parameter value to an array column,
you have to create the correct struct representing an array datatype,
as expected by array_recv.  This implies making the appropriate array
header and (for integer data) converting each value to big-endian byte
order.  A plain C uint32[] array definitely hasn't got the header, and
on Intel platforms it's the wrong byte order too.  There is not anything
built into libpq that will do the translation for you.

			regards, tom lane



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group