Markus Schaber wrote:
>Okay, so this is fine for primitive types. How does SPI deal with
>complex types?
>
>
A complex type is represented by a C-structure called HeapTuple. A
HeapTuple is associated with a TupleDesc that acts as its description.
The HeapTuple is passed by reference (a C-language pointer) and PLJava
will obtains its individual values as Datums using a function called
SPI_getbinval. An individual value may of course be a reference to
another complex type.
Complex types are created using the function heap_form_tuple.
>Yes, I have. Especially for large geometries. In our database, we have
>geometry objects up to 20MB per piece. Also, in PostGIS, send/receive
>binary representation differs slightly from internal representation (and
>input/output text is even more overhead).
>
>
Ok. We are probably talking about different things. I'm referring to the
internal C-functions that are executed directly in the backend.
- thomas