Re: AFTER triggers & RETURN

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: AFTER triggers & RETURN
Date: 2009-11-05 21:57:47
Message-ID: 3360.1257458267@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> Robert Haas wrote:
>> Since the return value is ignored anyway, why do we have to complain
>> if it's left out altogether? Granted, it's easy to work around, but
>> still.

> Isn't is a requirement of plpgsql that you not fall off the end of a
> function unless it is declared to return void? The function doesn't know
> if it will be called before or after.

Yeah, it couldn't be done as a compile-time check. You could probably
make it work if you converted the error to a run-time test. Not sure
if that's really an improvement though.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2009-11-05 22:10:51 Re: Why do OLD and NEW have special internal names?
Previous Message Merlin Moncure 2009-11-05 21:55:43 Re: Typed tables