Tom Lane wrote:
> Joe Conway <mail(at)joeconway(dot)com> writes:
>> + TupleDesc queryDesc; /* descriptor for planned query */
>>to ReturnSetInfo, and populates ReturnSetInfo for every function call to
>> ExecMakeTableFunctionResult, not just when fn_retset.
> I thought "expectedDesc" was a more sensible choice of name, so I made
> it that. Otherwise, patch applied.
I was trying to actually use this new feature today, and ran into a
little bug in nodeFunctionscan.c that prevented it from actually working.
For anonymous composite types, ExecInitFunctionScan builds the tuple
tupdesc = BuildDescForRelation(coldeflist);
But BuildDescForRelation leaves initializes the tupdesc like this:
desc = CreateTemplateTupleDesc(natts, UNDEFOID);
The UNDEFOID later causes an assertion failure in heap_formtuple when
you try to use the tupdesc to build a tuple.
Attached is a very small patch to fix.
>>I haven't done it yet, but I suppose this should be documented in
> Actually, most of what's in src/backend/utils/fmgr/README should be
> transposed into xfunc.sgml someday.
After beta starts I'll work on migrating this to the sgml docs.
In response to
pgsql-hackers by date
|Next:||From: Bruce Momjian||Date: 2002-08-31 18:55:03|
|Subject: Re: source code indexer|
|Previous:||From: Iavor Raytchev||Date: 2002-08-31 17:55:49|
|Subject: pgaccess 0.98.8 beta 1 - the show starts|