pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Denis BUCHER <dbucherml@hsolutions.ch>
Cc: pgsql-sql@postgresql.org
Subject: Re: Problem with return type of function ???
Date: Thu, 22 Oct 2009 14:46:09 +0100
Message-ID: <4AE06221.5040403@archonet.com> (raw)
In-Reply-To: <4AE05E55.4000500@hsolutions.ch>
References: <4AE042AF.9020507@hsolutions.ch>
	<4AE044C6.8010306@archonet.com>
	<4AE046B7.5070805@hsolutions.ch>
	<4AE05DD0.7010809@archonet.com>
	<4AE05E55.4000500@hsolutions.ch>

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



view thread (10+ messages)  latest in thread

Message-ID: <4AE06221.5040403@archonet.com>
Permalink:  ../4AE06221.5040403@archonet.com/
Also on:    postgresql.org/message-id/4AE06221.5040403@archonet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: dev@archonet.com, dbucherml@hsolutions.ch
  Subject: Re: Problem with return type of function ???
  In-Reply-To: <4AE06221.5040403@archonet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox