From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | silly sad <sad(at)bankir(dot)ru> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: very frustrating feature-bug |
Date: | 2010-02-17 11:37:36 |
Message-ID: | 162867791002170337l46de1cfre679f5c3d0f409f9@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
2010/2/17 silly sad <sad(at)bankir(dot)ru>:
> On 02/17/10 13:51, Jasen Betts wrote:
>>
>> On 2010-02-17, silly sad<sad(at)bankir(dot)ru> wrote:
>>>
>>> acc=>
>>>
>>> CREATE OR REPLACE FUNCTION add_user (TEXT, TEXT, TEXT, TEXT)
>>> RETURNS usr AS $$
>>> INSERT INTO usr (login,pass,name,email) VALUES ($1,$2,$3,$4)
>>> RETURNING usr.*;
>>> $$ LANGUAGE sql SECURITY DEFINER;
>>>
>>> acc=>
>>>
>>> ERROR: return type mismatch in function declared to return usr
>>> DETAIL: Function's final statement must be a SELECT.
>>> CONTEXT: SQL function "add_user"
>>>
>>> SURPRISE :-) SURPRISE :-)
>>
>> SQL functions are inlined when invoked, and so must be valid subselects.
>>
>> rewrite it in plpgsql.
>
> thanx for advice.
>
> may i ask? when this feature will be fixed?
> (now i am using 8.3.9)
>
please, report it as bug to pgsql-bugs
Regards
Pavel Stehule
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>
From | Date | Subject | |
---|---|---|---|
Next Message | Amitabh Kant | 2010-02-17 15:18:27 | Referencing external table in update/insert triggers |
Previous Message | silly sad | 2010-02-17 11:34:25 | Re: very frustrating feature-bug |