Re: PL/PgSQL: RAISE and the number of parameters
От | Fabien COELHO |
---|---|
Тема | Re: PL/PgSQL: RAISE and the number of parameters |
Дата | |
Msg-id | alpine.DEB.2.10.1408121245280.23442@sto обсуждение исходный текст |
Ответ на | PL/PgSQL: RAISE and the number of parameters (Marko Tiikkaja <marko@joh.to>) |
Ответы |
Re: PL/PgSQL: RAISE and the number of parameters
|
Список | pgsql-hackers |
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.
В списке pgsql-hackers по дате отправления: