Re: Problem with return type of function ??? - Mailing list pgsql-sql

From Richard Huxton
Subject Re: Problem with return type of function ???
Date
Msg-id 4AE06221.5040403@archonet.com
Whole thread Raw
In response to Re: Problem with return type of function ???  (Denis BUCHER <dbucherml@hsolutions.ch>)
Responses Re: Problem with return type of function ???  (Denis BUCHER <dbucherml@hsolutions.ch>)
List pgsql-sql
Denis BUCHER wrote:
> I saw somwhere it could be the order of the fields ?

Not if you are doing "SELECT * FROM".

Create an empty test database and a short script to create the table and
function, insert a couple of rows then call the function. If you wrap
the whole thing in BEGIN ... ROLLBACK we can change things until we see
the problem.

The other thing you could try is printing out row before returning it: RAISE NOTICE 'row = %', row; RETURN NEXT ROW;
It might be you've not got what you were expecting.

--  Richard Huxton Archonet Ltd


pgsql-sql by date:

Previous
From: Denis BUCHER
Date:
Subject: Re: Problem with return type of function ???
Next
From: Denis BUCHER
Date:
Subject: Re: Problem with return type of function ???