Function return type does not match

From: Juan Francisco Diaz <j-diaz(at)publicar(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Function return type does not match
Date: 2003-09-25 15:55:24
Message-ID: BB987A1C.C4A%j-diaz@publicar.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi I modified my function to:

CREATE FUNCTION buscablista (character varying, character varying) RETURNS
SETOF cabezalista
AS '

select * from cabezalista where idlista like CAST($1 AS CHAR(20)) and
idlibro like CAST($2 AS CHAR(6));

' LANGUAGE sql;

But when called it gives me the error:

ERROR: Query-specified return tuple and actual function return tuple do not
match
ERROR: Query-specified return tuple and actual function return tuple do not
match

As i see it, the return types are the same (cabezalista) whic is a table in
my database... I think something went wrong when i dropped and re created
the table in order to add a column and do some other minor changes (like
changing char(6) to char (7) in some columns)

Thanks a lot
JuanF

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Bruce Momjian 2003-09-25 17:25:15 Re: Group does not exist.
Previous Message Sjors 2003-09-25 15:45:35 Ranking?