Skip site navigation (1) Skip section navigation (2)

Re: [COMMITTERS] pgsql: Fix a bug in how we generate partition constraints.

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Amit Langote <amitlangote09(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Fix a bug in how we generate partition constraints.
Date: 2017-01-16 06:04:38
Message-ID: 9ce97382-54c8-deb3-9ee9-a2ec271d866b@lab.ntt.co.jp (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-committerspgsql-hackers
On 2017/01/14 13:36, Amit Langote wrote:
> On Sat, Jan 14, 2017 at 6:10 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> On Fri, Jan 13, 2017 at 3:09 PM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)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.

And here is the patch.

Thanks,
Amit

Attachment: 0001-Avoid-code-duplication-in-map_partition_varattnos.patch
Description: text/x-diff (1.9 KB)

In response to

pgsql-hackers by date

Next:From: Michael PaquierDate: 2017-01-16 06:08:28
Subject: Re: An isolation test for SERIALIZABLE READ ONLY DEFERRABLE
Previous:From: Michael PaquierDate: 2017-01-16 05:47:51
Subject: Re: Patch to implement pg_current_logfile() function

pgsql-committers by date

Next:From: Fujii MasaoDate: 2017-01-16 09:56:14
Subject: pgsql: Fix typos in comments.
Previous:From: Tom LaneDate: 2017-01-15 19:09:45
Subject: pgsql: Fix matching of boolean index columns to sort ordering.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group