From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-sql@postgresql.org
Subject: Calling void functions
Date: Mon, 2 Apr 2007 10:02:26 +0200
Message-ID: <200704021002.26282.peter_e@gmx.net> (raw)
I'm informed that the last statement of a function that returns void cannot be
a SELECT. How else is one supposed to call another function which also
returns void?
E.g.,
CREATE FUNCTION foo (a int, b int) RETURNS void
LANGUAGE plpgsql
AS $$ do important things $$;
CREATE FUNCTION foo (a int) RETURNS void
LANGUAGE sql
AS $$ SELECT foo($1, default-value); $$;
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
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: peter_e@gmx.net
Subject: Re: Calling void functions
In-Reply-To: <200704021002.26282.peter_e@gmx.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