|From:||Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>|
|To:||Marko Tiikkaja <marko(at)joh(dot)to>|
|Subject:||Re: PL/PgSQL: RAISE and the number of parameters|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
> 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
|Next Message||Marko Tiikkaja||2014-08-12 11:23:26||Re: PL/PgSQL: RAISE and the number of parameters|
|Previous Message||Andres Freund||2014-08-12 11:08:11||Re: Incorrect log message and checks in pgrecvlogical|