From: Edward Grabczewski <edward.grabczewski@btinternet.com>
To: pgsql-sql@postgresql.org
Subject: Re: SQL FUNCTION return type on INSERT
Date: Sat, 3 Nov 2001 14:12:36 -0000
Message-ID: <9s0tnd$1tbd$1@news.tht.net> (raw)
References: <9s0n0p$1saj$1@news.tht.net>
I've just looked at the new online 7.2 documentation and found that all
functions must end in some kind of select.
How about this then?
CREATE FUNCTION foo(varchar)
RETURN unknown
AS '
INSERT INTO footable VALUES ($1);
SELECT null; '
LANGUAGE 'sql';
"Edward Grabczewski" <edward.grabczewski@btinternet.com> wrote in message
news:9s0n0p$1saj$1@news.tht.net...
> What value should I RETURN for a SQL FUNCTION that contains an INSERT
> statement?
>
> --
> Eddy Grabczewski
> edward.grabczewski@btinternet.com
>
>
>
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: edward.grabczewski@btinternet.com
Subject: Re: SQL FUNCTION return type on INSERT
In-Reply-To: <9s0tnd$1tbd$1@news.tht.net>
* 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