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 DD634D1B46C for ; Thu, 27 Nov 2003 17:32:30 +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 11496-02 for ; Thu, 27 Nov 2003 13:31:59 -0400 (AST) Received: from anchor-post-30.mail.demon.net (anchor-post-30.mail.demon.net [194.217.242.88]) by svr1.postgresql.org (Postfix) with ESMTP id 98FF5D1B4CA for ; Thu, 27 Nov 2003 13:31:43 -0400 (AST) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-30.mail.demon.net with esmtp (Exim 3.35 #1) id 1APPzS-000Cra-0U; Thu, 27 Nov 2003 17:31:42 +0000 Received: by mainbox.archonet.com (Postfix, from userid 529) id CBBEC1631C; Thu, 27 Nov 2003 17:31:40 +0000 (GMT) Received: from client17.archonet.com (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 238C1162E6; Thu, 27 Nov 2003 17:31:39 +0000 (GMT) From: Richard Huxton To: Andreas Tille Subject: Re: Scaler forms as function arguments Date: Thu, 27 Nov 2003 17:31:38 +0000 User-Agent: KMail/1.5 Cc: PostgreSQL SQL References: <3FC61ED4.6050205@joeconway.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200311271731.38313.dev@archonet.com> X-Bogosity: No, tests=bogofilter, spamicity=0.000000, version=0.15.3 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/308 X-Sequence-Number: 16123 On Thursday 27 November 2003 16:40, Andreas Tille wrote: > On Thu, 27 Nov 2003, Joe Conway wrote: > > Andreas Tille wrote: > > > test=# select PLpgSQLDepartmentSalaries() ; > > > > This should be: > > regression=# select * from PLpgSQLDepartmentSalaries(); > > departmentid | totalsalary > > --------------+------------- > > 1 | 80000 > > 2 | 60000 > > (2 rows) > > Well, it is easy to understand what it 'should be' reading the code - but > it throws the error message I posted. Is this possibly a feature of a > higher PostgreSQL version than 7.3.2? No - look carefully at Joe's response. He's calling it like: SELECT * FROM my_function(); You treat the function like a table. -- Richard Huxton Archonet Ltd