Re: Better support for whole-row operations and composite types

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Better support for whole-row operations and composite types
Date: 2004-04-03 05:02:27
Message-ID: 11811.1080968547@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Joe Conway <mail(at)joeconway(dot)com> writes:
> I still haven't had time to look closely, and well may have been doing
> something non-standard all along, but in any case this is the current
> failing code:

> /* for tuple args, convert to a one row data.frame */
> TupleTableSlot *slot = (TupleTableSlot *) arg[i];
> HeapTuple tuples = slot->val;
> TupleDesc tupdesc = slot->ttc_tupleDescriptor;

Um. Well, the arg is not a TupleTableSlot * anymore, so this is
guaranteed to fail. This isn't part of what I thought the documented
SRF API was though. If you take the arg[i] value and pass it to
GetAttributeByName or GetAttributeByNum it will work (with some compiler
warnings) and AFAICS we never documented more than that.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2004-04-03 06:00:54 Re: Better support for whole-row operations and composite
Previous Message Joe Conway 2004-04-03 04:28:29 Re: Better support for whole-row operations and composite