Re: [HACKERS] [COMMITTERS] pgsql: Fix a bug in how we generatepartition constraints. - Mailing list pgsql-hackers

From Amit Langote
Subject Re: [HACKERS] [COMMITTERS] pgsql: Fix a bug in how we generatepartition constraints.
Date
Msg-id CA+HiwqHtXOnM=Ty1UNkSOT-6274q8LRhHsSRn4eEFuuYMObv+A@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] [COMMITTERS] pgsql: Fix a bug in how we generate partition constraints.  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [HACKERS] [COMMITTERS] pgsql: Fix a bug in how we generatepartition constraints.
List pgsql-hackers
On Sat, Jan 14, 2017 at 6:10 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Fri, Jan 13, 2017 at 3:09 PM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
>>
>> I'm just saying that the problem at hand is already solved for a related
>> feature, so ISTM this new code should use the recently added routine
>> rather than doing the same thing in a different way.
>
> Oh, I see.  Amit, thoughts?

Hm, perhaps.  The code in map_partition_varattnos() that creates the
map could be replaced by a call to the new
convert_tuples_by_name_map().  In fact, it could even have used the
old version of it (convert_tuples_by_name()).  I guess I just aped
what other callers of map_variable_attnos() were doing, which is to
generate the map themselves (not that they ought to be changed to use
convert_tuples_by_name_map).

I will send a patch at my earliest convenience. Thanks to Alvaro for
pointing that out.

Thanks,
Amit



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: [HACKERS] Protect syscache from bloating with negative cacheentries
Next
From: Serge Rielau
Date:
Subject: Re: [HACKERS] Packages: Again