pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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/



view thread (5+ messages)  latest in thread

Message-ID: <200704021002.26282.peter_e@gmx.net>
Permalink:  ../200704021002.26282.peter_e@gmx.net/
Also on:    postgresql.org/message-id/200704021002.26282.peter_e@gmx.net

 · 

reply

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