Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id CB5709FB408 for ; Mon, 2 Apr 2007 05:02:33 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 07442-03 for ; Mon, 2 Apr 2007 05:02:33 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from gauss.credativ.com (ipx11302.ipxserver.de [212.112.227.254]) by postgresql.org (Postfix) with ESMTP id 408DB9FB2AF for ; Mon, 2 Apr 2007 05:02:33 -0300 (ADT) Received: from hawking.credativ.lan (unknown [87.139.82.80]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by gauss.credativ.com (Postfix) with ESMTP id 6294AD78DB for ; Mon, 2 Apr 2007 10:02:31 +0200 (CEST) From: Peter Eisentraut To: pgsql-sql@postgresql.org Subject: Calling void functions Date: Mon, 2 Apr 2007 10:02:26 +0200 User-Agent: KMail/1.9.5 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200704021002.26282.peter_e@gmx.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/4 X-Sequence-Number: 28004 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/