Re: AFTER triggers & RETURN - Mailing list pgsql-hackers

From Tom Lane
Subject Re: AFTER triggers & RETURN
Date
Msg-id 3360.1257458267@sss.pgh.pa.us
Whole thread Raw
In response to Re: AFTER triggers & RETURN  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: AFTER triggers & RETURN
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.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


pgsql-hackers by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Typed tables
Next
From: "Kevin Grittner"
Date:
Subject: Re: Why do OLD and NEW have special internal names?