From: | Antti Haapala <antti(dot)haapala(at)iki(dot)fi> |
---|---|
To: | Rory Campbell-Lange <rory(at)campbell-lange(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Return Record |
Date: | 2003-06-08 09:05:06 |
Message-ID: | Pine.GSO.4.55.0306081159190.25259@paju.oulu.fi |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-novice |
On Fri, 6 Jun 2003, Rory Campbell-Lange wrote:
> On 06/06/03, Rory Campbell-Lange (rory(at)campbell-lange(dot)net) wrote:
> > I'm not clear on how to handle returning a record from a function.
> > I have planned a function that is handed two strings and returns two
> > integers. I need to return errors that satisfy the return type. At the
> > moment my "RETURN 0;" lines result in "return type mismatch..." errors.
>
> I've found a userful resource on postgresql.org:
>
> "PostgreSQL 7.3 Set Returning Functions":
> http://techdocs.postgresql.org/guides/SetReturningFunctions
>
> However I'm still having trouble living up to the title of the article!
>
> The error I'm getting is:
> temporary=> select fn_b1_login('email(at)email', 'pass');
> WARNING: Error occurred while executing PL/pgSQL function fn_b1_login
> WARNING: while casting return value to function's return type
> ERROR: Set-valued function called in context that cannot accept a set
*sigh*
temporary=> select * from fn_b1_login('email(at)email', 'pass');
--
Antti Haapala
From | Date | Subject | |
---|---|---|---|
Next Message | Rory Campbell-Lange | 2003-06-08 12:03:43 | Re: Question about serial vs. int datatypes |
Previous Message | Paul Thomas | 2003-06-08 08:11:25 | Re: Question about serial vs. int datatypes |
From | Date | Subject | |
---|---|---|---|
Next Message | Joanne Formoso | 2003-06-08 10:47:52 | Weird Database Encryption Bug |
Previous Message | Jean-Christian Imbeault | 2003-06-08 08:31:14 | Re: Procedural Postgresql |