Re: Postgresq 8,1 hangs when running function

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: ben sewell <mosherben(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Postgresq 8,1 hangs when running function
Date: 2006-08-21 14:30:19
Message-ID: 20060821143019.GA37018@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Mon, Aug 21, 2006 at 02:31:37PM +0100, ben sewell wrote:
> ok now I seem to be getting somewhere, inputting stuff into my function and
> now it's saying returned record type does not match expected record type,
> even thorugh I give the types of the fields in the query. Any ideas? I've
> checked the fields I am expecting to be returned against what they are
> stored as in the DB and there are nothing different.

The column list in the query you posted doesn't match the column
list being returned from the function: the query is missing
provider_company between plangroup and policy_number.

Comparing column lists might be easier and less error-prone if you
align them vertically, one column per line. Then you could view
the function's query and the calling query side-by-side and quickly
observe whether they match or not.

--
Michael Fuhr

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message ben sewell 2006-08-21 14:37:52 Re: Postgresq 8,1 hangs when running function
Previous Message Sean Davis 2006-08-21 14:08:24 Re: Postgresq 8,1 hangs when running function