Re: Error check always bypassed in tablefunc.c - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Error check always bypassed in tablefunc.c
Date
Msg-id CAB7nPqTsNd_35Rwt7+v-FzYcWa_FM9OcK=7aWK-7OVa4_74GeQ@mail.gmail.com
Whole thread Raw
In response to Re: Error check always bypassed in tablefunc.c  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Jan 30, 2015 at 10:32 AM, Tom Lane <tgl@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
> releases is probably a bad idea.
Hm. OK. I am fine with that for the back branches. Thanks for
tightening things on master as well.

> * I thought it was odd to throw an error for NULL input, especially
> an "infinite recursion" error.  However, even with your patch the code
> would've dumped core on a null current_key value (since it would've
> passed a null start_with down to the next recursion level).  What I
> changed it to was to omit the recursion test (and hence print the row)
> and then not recurse at a null.  This seems consistent and reasonable.
This sounds reasonable to me as well.

> * I made a few other minor cleanups as well, in particular getting
> rid of some unnecessary pstrdup() steps.
Thanks!
-- 
Michael



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Error check always bypassed in tablefunc.c
Next
From: Tom Lane
Date:
Subject: Re: Exposing the stats snapshot timestamp to SQL