Re: Scaler forms as function arguments - Mailing list pgsql-sql

From Richard Huxton
Subject Re: Scaler forms as function arguments
Date
Msg-id 200311271731.38313.dev@archonet.com
Whole thread Raw
In response to Re: Scaler forms as function arguments  (Andreas Tille <tillea@rki.de>)
List 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


pgsql-sql by date:

Previous
From: Tomasz Myrta
Date:
Subject: explicit joins wrong planning
Next
From: Joe Conway
Date:
Subject: Re: Scaler forms as function arguments