Re: TupleDesc and HeapTuple

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Luca Ferrari <fluca1978(at)infinito(dot)it>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: TupleDesc and HeapTuple
Date: 2010-07-07 13:20:24
Message-ID: AANLkTinbaLwIPZn6hxjUDe3BBxSNMpmL3I6hSyhCsTds@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2010/7/7 Luca Ferrari <fluca1978(at)infinito(dot)it>:
> On Tuesday, July 06, 2010 09:58:45 pm Alvaro Herrera's cat walking on the
> keyboard wrote:
>> You're supposed to know which relation you got the HeapTuple from, so
>> you get the TupleDesc from there.
>
> True, but if I want to pass the heaptuple around I must pass also its tuple
> desc, or the receiver will not know how the tuple is composed. Maybe this case
> never happens/happened.
>

In pg core - receiver have to have actual datatype everywhere - so if
you write a some general function, then you put a Datum value -
universal PostgreSQL datatype and you have to put a datatype
identification - Oid, typmod or TupleDesc.

Pavel

> Luca
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2010-07-07 13:21:32 Re: optimizer choosing the wrong index
Previous Message Luca Ferrari 2010-07-07 11:43:04 Re: TupleDesc and HeapTuple