Re: [HACKERS] PL/PgSQL: RAISE and the number of parameters

2014-09-02 Thread Marko Tiikkaja
Hi, On 2014-09-02 15:04, Heikki Linnakangas wrote: I think this patch has been thoroughly reviewed now. Committed, thanks! Thank you, Heikki. And also big thanks to Fabien for the review! .marko -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] PL/PgSQL: RAISE and the number of parameters

2014-09-02 Thread Heikki Linnakangas
On 09/02/2014 11:52 AM, Fabien COELHO wrote: I've changed the loop slightly. Do you find this more readable than the way the loop was previously written? It is 50% better:-) It is no big deal, but I still fail to find the remaining continue as usefull in this case. If you remove the "contin

Re: [HACKERS] PL/PgSQL: RAISE and the number of parameters

2014-09-02 Thread Fabien COELHO
Hello Marko, I've changed the loop slightly. Do you find this more readable than the way the loop was previously written? It is 50% better:-) It is no big deal, but I still fail to find the remaining continue as usefull in this case. If you remove the "continue" line and invert the condit

Re: [HACKERS] PL/PgSQL: RAISE and the number of parameters

2014-09-01 Thread Marko Tiikkaja
On 2014-08-12 13:23, I wrote: 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 personally find the code easier to read with the continue. I've changed t

Re: [HACKERS] PL/PgSQL: RAISE and the number of parameters

2014-08-12 Thread Pavel Stehule
2014-08-12 19:14 GMT+02:00 Fabien COELHO : > > one note: this patch can enforce a compatibility issues - a partially >> broken functions, where some badly written RAISE statements was executed >> newer. >> > > I am not against this patch, but it should be in extra check probably ?? >> > > I'm no

Re: [HACKERS] PL/PgSQL: RAISE and the number of parameters

2014-08-12 Thread Fabien COELHO
one note: this patch can enforce a compatibility issues - a partially broken functions, where some badly written RAISE statements was executed newer. I am not against this patch, but it should be in extra check probably ?? I'm not sure about what you mean by "it should be in extra check".

Re: [HACKERS] PL/PgSQL: RAISE and the number of parameters

2014-08-12 Thread Pavel Stehule
2014-08-12 15:09 GMT+02:00 Fabien COELHO : > > Hello, > > > - I would suggest to avoid "continue" within a loop so that the code is >>> simpler to understand, at least for me. >>> >> >> I personally find the code easier to read with the continue. >> > > Hmmm. I had to read the code to check it, a

Re: [HACKERS] PL/PgSQL: RAISE and the number of parameters

2014-08-12 Thread Fabien COELHO
Hello, - I would suggest to avoid "continue" within a loop so that the code is simpler to understand, at least for me. I personally find the code easier to read with the continue. Hmmm. I had to read the code to check it, and I did it twice. The point is that there is 3 exit points instead

Re: [HACKERS] PL/PgSQL: RAISE and the number of parameters

2014-08-12 Thread Marko Tiikkaja
Hi Fabien, On 8/12/14 1:09 PM, Fabien COELHO wrote: 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 wa

Re: [HACKERS] PL/PgSQL: RAISE and the number of parameters

2014-08-12 Thread Fabien COELHO
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

Re: [HACKERS] PL/PgSQL: RAISE and the number of parameters

2014-07-26 Thread Pavel Stehule
Hi 2014-07-26 20:39 GMT+02:00 Marko Tiikkaja : > Me again, > > 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