Search Postgresql Archives

Re: Accessing composite type elements

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

 



Garfield Lewis <garfield.lewis@xxxxxxxxxx> writes:
> In my client-side C code I am using PQgetvalue to pull in the data from the row/column. However, since it is a composite type, it is unclear to me how to get the individual members from the data.

Binary representations are not too well documented :-(.  However,
looking at record_send() helps here.

> My best guess right now is:
>   *   0x2 is the number of members
>   *   0x4 and 0x143 are the lengths of the individual members
>   *   0x17 and 0x8e are the OID for the member type

Right, with the additional proviso that -1 "length" indicates a null
field value.

			regards, tom lane






[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 Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux