Re: returning more than one value from a function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Lonni J Friedman <netllama(at)gmail(dot)com>
Cc: Leif Biberg Kristensen <leif(at)solumslekt(dot)org>, pgsql-novice(at)postgresql(dot)org
Subject: Re: returning more than one value from a function
Date: 2010-05-01 22:56:07
Message-ID: 10764.1272754567@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Lonni J Friedman <netllama(at)gmail(dot)com> writes:
> ... Now I've got the
> opposite problem, namely that I can't find a way to have my function
> not return anything at all. Whenever I try to remove the 'RETURN AS
> ....' portion of the function, it fails to get created. Is it not
> possible to have a function that returns nothing?

Declare it as RETURNS VOID. This is really just window dressing, as
the actual behavior is to return a null value, but it documents your
intention.

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Charles Holleran 2010-05-03 17:03:53 field names for new in trigger function
Previous Message Lonni J Friedman 2010-05-01 22:49:10 Re: returning more than one value from a function