Re: [HACKERS] Error check always bypassed in tablefunc.c

2015-01-29 Thread Michael Paquier
On Fri, Jan 30, 2015 at 10:32 AM, Tom Lane t...@sss.pgh.pa.us wrote: [blah] What I did about this was to leave the behavior alone in back branches, but insist on a type match in HEAD. I think we can reasonably tighten the type requirements in a new major release, but doing it in minor

Re: [HACKERS] Error check always bypassed in tablefunc.c

2015-01-29 Thread Tom Lane
Michael Paquier michael.paqu...@gmail.com writes: So, I have been poking at this code a bit more and as the values of the parameters are passed as-is to the SQL queries that connectby generates internally (this is as well mentioned in the documentation here:

Re: [HACKERS] Error check always bypassed in tablefunc.c

2015-01-25 Thread Michael Paquier
On Sat, Jan 17, 2015 at 11:16 PM, Michael Paquier michael.paqu...@gmail.com wrote: Patch is attached. Comments welcome. So, I have been poking at this code a bit more and as the values of the parameters are passed as-is to the SQL queries that connectby generates internally (this is as well

Re: [HACKERS] Error check always bypassed in tablefunc.c

2015-01-21 Thread Michael Paquier
On Tue, Jan 20, 2015 at 4:05 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Tue, Jan 20, 2015 at 8:47 AM, Michael Paquier michael.paqu...@gmail.com wrote: On Mon, Jan 19, 2015 at 11:06 PM, Joe Conway m...@joeconway.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On

Re: [HACKERS] Error check always bypassed in tablefunc.c

2015-01-19 Thread Michael Paquier
On Mon, Jan 19, 2015 at 11:06 PM, Joe Conway m...@joeconway.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/19/2015 08:16 AM, Alvaro Herrera wrote: Haven't looked at this patch, but I wonder if it would be better to replace the innards of connectby with a rewrite of the query

Re: [HACKERS] Error check always bypassed in tablefunc.c

2015-01-19 Thread Michael Paquier
On Tue, Jan 20, 2015 at 8:47 AM, Michael Paquier michael.paqu...@gmail.com wrote: On Mon, Jan 19, 2015 at 11:06 PM, Joe Conway m...@joeconway.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/19/2015 08:16 AM, Alvaro Herrera wrote: Haven't looked at this patch, but I wonder if

Re: [HACKERS] Error check always bypassed in tablefunc.c

2015-01-19 Thread Alvaro Herrera
Haven't looked at this patch, but I wonder if it would be better to replace the innards of connectby with a rewrite of the query to use standard WITH queries. Maybe we can remove a couple hundred lines from tablefunc.c? -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL

Re: [HACKERS] Error check always bypassed in tablefunc.c

2015-01-19 Thread Joe Conway
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/19/2015 08:16 AM, Alvaro Herrera wrote: Haven't looked at this patch, but I wonder if it would be better to replace the innards of connectby with a rewrite of the query to use standard WITH queries. Maybe we can remove a couple hundred

Re: [HACKERS] Error check always bypassed in tablefunc.c

2015-01-17 Thread Michael Paquier
Alvaro Herrera wrote: Michael Paquier wrote: As mentioned in $subject, commit 08c33c4 of 2003 has made the following block of code dead in tablefunc.c:1320 because level is incremented to at least 1: /* First time through, do a little more setup */ if (level

[HACKERS] Error check always bypassed in tablefunc.c

2015-01-16 Thread Michael Paquier
Hi all, As mentioned in $subject, commit 08c33c4 of 2003 has made the following block of code dead in tablefunc.c:1320 because level is incremented to at least 1: /* First time through, do a little more setup */ if (level == 0) {

Re: [HACKERS] Error check always bypassed in tablefunc.c

2015-01-16 Thread Alvaro Herrera
Michael Paquier wrote: As mentioned in $subject, commit 08c33c4 of 2003 has made the following block of code dead in tablefunc.c:1320 because level is incremented to at least 1: /* First time through, do a little more setup */ if (level == 0)