Re: Scaler forms as function arguments

From: Richard Huxton <dev(at)archonet(dot)com>
To: Andreas Tille <tillea(at)rki(dot)de>
Cc: PostgreSQL SQL <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Scaler forms as function arguments
Date: 2003-11-27 17:31:38
Message-ID: 200311271731.38313.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Randolf Richardson 2003-11-28 04:37:12 Re: SQL a simple menu - plz help
Previous Message Tomasz Myrta 2003-11-27 17:11:51 explicit joins wrong planning