From: silly sad <sad@bankir.ru>
To: pgsql-sql@postgresql.org
Subject: very frustrating feature-bug
Date: Wed, 17 Feb 2010 10:20:15 +0300
Message-ID: <4B7B98AF.9050202@bankir.ru> (raw)
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 :-)
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: sad@bankir.ru
Subject: Re: very frustrating feature-bug
In-Reply-To: <4B7B98AF.9050202@bankir.ru>
* 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