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