Peter Eisentraut <[EMAIL PROTECTED]> writes: > In ProcedureCreate() (backend/catalog/pg_proc.c) there are special cases > for the built-in languages that check whether the to-be-created function > has a valid body. ISTM that we could extend that for user-defined > functions, as follows.
> When creating a language, the user can optionally register a "check" > function for the language, whose responsibility is to check the supplied > function body for correctness and return a Boolean result. This function > would be executed at the time the function is created. Are you planning to also move the existing special cases out to functions called through this same interface? That would make pg_proc.c a lot cleaner, I think. I don't see any value in returning a boolean; might as well let the thing just throw an elog --- with, one hopes, an error message somewhat more specific than "bad function body". regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])