From: Pavel Stehule <pavel.stehule@gmail.com>
To: silly sad <sad@bankir.ru>
Cc: pgsql-sql@postgresql.org
Subject: Re: very frustrating feature-bug
Date: Wed, 17 Feb 2010 12:37:36 +0100
Message-ID: <162867791002170337l46de1cfre679f5c3d0f409f9@mail.gmail.com> (raw)
In-Reply-To: <4B7BD441.1080201@bankir.ru>
References: <4B7B98AF.9050202@bankir.ru>
<hlghmo$3g2$2@reversiblemaps.ath.cx>
<4B7BD441.1080201@bankir.ru>
2010/2/17 silly sad <sad@bankir.ru>:
> On 02/17/10 13:51, Jasen Betts wrote:
>>
>> On 2010-02-17, silly sad<sad@bankir.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@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: pavel.stehule@gmail.com, sad@bankir.ru
Subject: Re: very frustrating feature-bug
In-Reply-To: <162867791002170337l46de1cfre679f5c3d0f409f9@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox