From: | Gaetano Mendola <mendola(at)bigfoot(dot)com> |
---|---|
To: | "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org> |
Cc: | Juan Francisco Diaz <j-diaz(at)publicar(dot)com> |
Subject: | Re: Function return type does not match |
Date: | 2003-09-25 17:54:42 |
Message-ID: | 3F732BE2.7030903@bigfoot.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Juan Francisco Diaz wrote:
> 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
I guess that you are calling the function like is a function:
select buscablista('foo', 'bar');
the function is a Table Function so :
select * from buscablista('foo', 'bar');
Regards
Gaetano Mendola
From | Date | Subject | |
---|---|---|---|
Next Message | Heath Tanner | 2003-09-25 17:55:50 | Re: Function return type does not match |
Previous Message | Bruno Wolff III | 2003-09-25 17:47:37 | Re: Backing Up a Postgres database... |