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