Andres Freund <and...@anarazel.de> writes: > On 2019-10-20 10:27:19 -0400, Tom Lane wrote: >> "RETURNS NOT NULL", perhaps? That'd have the advantage of not requiring >> any new keyword.
> That could work. Actually, I think we probably don't need any SQL representation of this at all, because if what you're going to do with it is omit logically necessary null-value checks, then a wrong setting would trivially crash the server. Therefore, we can never give the ability to set this flag to users; we could only set it on built-in functions. (But that saves a lot of work, eg dump/restore support isn't needed either.) This doesn't seem too awful to me, because non-builtin functions are most likely slow enough that it doesn't matter. regards, tom lane