Re: Problem with return type of function ???

From: Richard Huxton <dev(at)archonet(dot)com>
To: Denis BUCHER <dbucherml(at)hsolutions(dot)ch>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Problem with return type of function ???
Date: 2009-10-22 13:46:09
Message-ID: 4AE06221.5040403@archonet.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Denis BUCHER 2009-10-22 13:59:56 Re: Problem with return type of function ???
Previous Message Denis BUCHER 2009-10-22 13:29:57 Re: Problem with return type of function ???