Re: Core dump in range_table_mutator() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Core dump in range_table_mutator()
Date
Msg-id 631351.1656128349@sss.pgh.pa.us
Whole thread Raw
In response to Re: Core dump in range_table_mutator()  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Responses Re: Core dump in range_table_mutator()  (Dean Rasheed <dean.a.rasheed@gmail.com>)
List pgsql-hackers
Dean Rasheed <dean.a.rasheed@gmail.com> writes:
> Not directly related to that change ... I think it would be easier to
> follow if the CHECKFLATCOPY() was replaced with a separate Assert()
> and FLATCOPY() (I had to go and remind myself what CHECKFLATCOPY()
> did).
> Doing that would allow CHECKFLATCOPY() to be deleted, since this is
> the only place that uses it -- every other case knows the node type is
> correct before doing a FLATCOPY().

Well, if we want to clean this up a bit rather than just doing the
minimum safe fix ... I spent some time why we were bothering with the
FLATCOPY step at all, rather than just mutating the Query* pointer.
I think the reason is to not fail if the QTW_DONT_COPY_QUERY flag is
set, but maybe we should clear that flag when recursing?

            regards, tom lane



pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: Core dump in range_table_mutator()
Next
From: Andrey Lepikhov
Date:
Subject: Re: Implement hook for self-join simplification