X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id CDA15529C9 for ; Tue, 12 Jul 2005 16:33:11 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 57843-03 for ; Tue, 12 Jul 2005 19:33:10 +0000 (GMT) Received: from mr2.surnet.cl (smtp2.surnet.cl [216.155.73.163]) by svr1.postgresql.org (Postfix) with ESMTP id 0DF2C529C4 for ; Tue, 12 Jul 2005 16:33:09 -0300 (ADT) Received: from smtp2.surnet.cl (216.155.73.169) by mr2.surnet.cl (7.0.031.3) id 4259ADFA014FB68B; Tue, 12 Jul 2005 15:32:48 -0400 Received: from smtp1.surnet.cl (smtp1.surnet.cl []) by mr2.surnet.cl ([216.155.73.169]); Tue, 12 Jul 2005 19:32:48 +0000 Received: from cluster.surnet.cl (216.155.73.164) by smtp1.surnet.cl (7.0.031.3) id 42587C6E01018D18; Tue, 12 Jul 2005 15:32:26 -0400 Received: from alvh.no-ip.org (200.85.218.66) by cluster.surnet.cl (7.0.043) (authenticated as alvherre@surnet.cl) id 42B3EF600036AE78; Tue, 12 Jul 2005 15:33:03 -0400 Received: by alvh.no-ip.org (Postfix, from userid 1000) id 12E01C31DD3; Tue, 12 Jul 2005 15:33:04 -0400 (CLT) Date: Tue, 12 Jul 2005 15:33:04 -0400 From: Alvaro Herrera To: Andrew Dunstan Cc: Michael Fuhr , pgsql-hackers@postgresql.org Subject: Re: PL/Perl list value return causes segfault Message-ID: <20050712193303.GA14060@alvh.no-ip.org> References: <20050712130452.GA84564@winnie.fuhr.org> <42D41319.70107@dunslane.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <42D41319.70107@dunslane.net> User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.383 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, FORGED_RCVD_HELO, RCVD_IN_NJABL_PROXY X-Spam-Level: * X-Archive-Number: 200507/440 X-Sequence-Number: 70492 On Tue, Jul 12, 2005 at 02:59:37PM -0400, Andrew Dunstan wrote: > Note that all plperl functions are called in scalar context, and it is > always wrong to return a list (as opposed to a listref). In fact, the > value received might surprise you even if it worked (it would be the > value of the last member of the list). Hmm, I don't know if it's feasible to do in Perl, but maybe check whether the function wants to return something in list context and throw an appropiate error message? -- Alvaro Herrera () "Nunca se desea ardientemente lo que solo se desea por razón" (F. Alexandre)