Hello Marko,
> Here's a patch for making PL/PgSQL throw an error during compilation (instead
> of runtime) if the number of parameters passed to RAISE don't match the
> number of placeholders in error message. I'm sure people can see the pros of
> doing it this way.
Patch scanned, applied & tested without problem on head.
The compile-time raise parameter checking is a good move.
3 minor points:
- I would suggest to avoid "continue" within a loop so that the code is
simpler to understand, at least for me.
- I would suggest to update the documentation accordingly.
- The execution code now contains error detections which should never be
raised, but I suggest to keep it in place anyway. However I would suggest
to add comments about the fact that it should not be triggered.
See the attached patch which implements these suggestions on top of your
patch.
--
Fabien.