Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 5F9B06323D3 for ; Wed, 17 Feb 2010 07:37:49 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 51231-10 for ; Wed, 17 Feb 2010 11:37:38 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ew0-f214.google.com (mail-ew0-f214.google.com [209.85.219.214]) by mail.postgresql.org (Postfix) with ESMTP id BBA4A6322CF for ; Wed, 17 Feb 2010 07:37:38 -0400 (AST) Received: by ewy6 with SMTP id 6so2194239ewy.34 for ; Wed, 17 Feb 2010 03:37:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=+lAVvR5hCKgebrypzHDoNSv5V7sO9h5qPqh3IlgY98s=; b=UH/WkU9h4BsJcZ/T1PEDX5jVi3e9Aq9Mi4B0/kUqeW5P0PM+xh+TFamTGT1C28LmYP 17opub+Et8Nx7FRG6V+Xe4kvapaC+HDufNqeu8jr59x6UA5PlvoxHYDDaWydWV14K2au PvpLPG7BXbOKDgnhmKdvThZFq8MRB30NrTOzo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Lam2zyvQ1eFQv1AugyPrBK/Yg4+ycTw21onQQN4qR2yO/tjf+mKQh7O+Ga9DC7Zgl5 lyUz4rVdn/Yf3/0SCyMi9Umoce6hqvFLYbJSJXguMbDMUjvC8jhG7ztg9KNeCyXiNv1m IL7eIEkTdRBm2ngL9XdPtT7KCzQ9zgLWsTn/Y= MIME-Version: 1.0 Received: by 10.216.88.79 with SMTP id z57mr4817934wee.22.1266406656714; Wed, 17 Feb 2010 03:37:36 -0800 (PST) In-Reply-To: <4B7BD441.1080201@bankir.ru> References: <4B7B98AF.9050202@bankir.ru> <4B7BD441.1080201@bankir.ru> Date: Wed, 17 Feb 2010 12:37:36 +0100 Message-ID: <162867791002170337l46de1cfre679f5c3d0f409f9@mail.gmail.com> Subject: Re: very frustrating feature-bug From: Pavel Stehule To: silly sad Cc: pgsql-sql@postgresql.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.11 tagged_above=-10 required=5 tests=BAYES_05=-1.11 X-Spam-Level: X-Archive-Number: 201002/65 X-Sequence-Number: 33664 2010/2/17 silly sad : > On 02/17/10 13:51, Jasen Betts wrote: >> >> On 2010-02-17, silly sad =C2=A0wrote: >>> >>> acc=3D> >>> >>> CREATE OR REPLACE FUNCTION add_user (TEXT, TEXT, TEXT, TEXT) >>> RETURNS usr AS $$ >>> =C2=A0 =C2=A0INSERT INTO usr (login,pass,name,email) VALUES ($1,$2,$3,$= 4) >>> =C2=A0 =C2=A0RETURNING usr.*; >>> $$ LANGUAGE sql SECURITY DEFINER; >>> >>> acc=3D> >>> >>> ERROR: =C2=A0return type mismatch in function declared to return usr >>> DETAIL: =C2=A0Function's final statement must be a SELECT. >>> CONTEXT: =C2=A0SQL 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 >