Re: c-function returning multiple rows - Mailing list pgsql-bugs

From Tom Lane
Subject Re: c-function returning multiple rows
Date
Msg-id 16102.988296940@sss.pgh.pa.us
Whole thread Raw
In response to c-function returning multiple rows  (Alexey Nalbat <alexey@price.ru>)
List pgsql-bugs
Alexey Nalbat <alexey@price.ru> writes:
> I digged into sources and supposed that line 61 in fmgr.h might be
> 'struct ReturnSetInfo *resultinfo;' instead of 'struct Node
> *resultinfo;'. But I'm not sure if it is correct.

No, it isn't.  fmgr.h is correct as given, because the resultinfo
field might point at various different kinds of Nodes.  You need to
do an IsA test and then a cast, instead.  See the code in
src/backend/executor/functions.c for an example.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Startup Problems on Win2K
Next
From: pgsql-bugs@postgresql.org
Date:
Subject: Cannot unzip binary tar.gz file for IRIX 6.5.7I