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 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 > releases is probably

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

2015-01-29 Thread Tom Lane
Michael Paquier 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: http://www.postgresql.org/docs/devel/static/tablefunc.htm

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 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 mentioned in the documentation

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 wrote: > On Tue, Jan 20, 2015 at 8:47 AM, Michael Paquier > wrote: >> On Mon, Jan 19, 2015 at 11:06 PM, Joe Conway wrote: >>> -BEGIN PGP SIGNED MESSAGE- >>> Hash: SHA1 >>> >>> On 01/19/2015 08:16 AM, Alvaro Herrera wrote: Haven't look

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 wrote: > On Mon, Jan 19, 2015 at 11:06 PM, Joe Conway 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

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 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 to >> use s

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 > l

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 Deve

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 */ >>

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) >