Re: Accessing composite type elements
| От | Tom Lane |
|---|---|
| Тема | Re: Accessing composite type elements |
| Дата | |
| Msg-id | 1026409.1654187025@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Accessing composite type elements (Garfield Lewis <garfield.lewis@lzlabs.com>) |
| Ответы |
Re: [EXT] Re: Accessing composite type elements
|
| Список | pgsql-general |
Garfield Lewis <garfield.lewis@lzlabs.com> 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
compositetype, 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
В списке pgsql-general по дате отправления: