Received: from sss.pgh.pa.us (sss.pgh.pa.us [216.151.103.158]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f3QEtm388428 for ; Thu, 26 Apr 2001 10:55:49 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.3/8.11.3) with ESMTP id f3QEteR16106; Thu, 26 Apr 2001 10:55:40 -0400 (EDT) To: alexey@price.ru cc: pgsql-bugs@postgresql.org Subject: Re: c-function returning multiple rows In-reply-to: <01042420581800.12729@workshop.price.ru> References: <01042420581800.12729@workshop.price.ru> Comments: In-reply-to Alexey Nalbat message dated "Tue, 24 Apr 2001 19:55:32 +0400" Date: Thu, 26 Apr 2001 10:55:40 -0400 Message-ID: <16102.988296940@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200104/206 X-Sequence-Number: 1280 Alexey Nalbat 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