Re: c-function returning multiple rows
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: alexey@price.ru
Cc: pgsql-bugs@postgresql.org
Date: 2001-04-26T14:55:40Z
Lists: 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