X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 98D91D1B48D for ; Thu, 15 Jan 2004 18:48:58 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 46333-01 for ; Thu, 15 Jan 2004 14:48:25 -0400 (AST) Received: from joeconway.com (66-146-172-86.skyriver.net [66.146.172.86]) by svr1.postgresql.org (Postfix) with ESMTP id 7DC91D1B500 for ; Thu, 15 Jan 2004 14:48:23 -0400 (AST) Received: from [192.168.5.3] (account jconway HELO joeconway.com) by joeconway.com (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 771367; Thu, 15 Jan 2004 10:45:40 -0800 Message-ID: <4006E059.7030802@joeconway.com> Date: Thu, 15 Jan 2004 10:47:53 -0800 From: Joe Conway User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: chris@hub.org Cc: pgsql-sql@postgresql.org Subject: Re: Problem with plpgsql function References: <1074191967.33449.11.camel@morpheus.hub.org> In-Reply-To: <1074191967.33449.11.camel@morpheus.hub.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/131 X-Sequence-Number: 16524 Chris Bowlby wrote: > select get_account_info('test.com'); > > I get this error: > > ERROR: set-valued function called in context that cannot accept a set This is the "classic" SRF error -- you need to use an SRF like a relation in the FROM clause, so do this instead: select * FROM get_account_info('test.com'); HTH, Joe