pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
To: Amit Langote <amitlangote09@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: [COMMITTERS] pgsql: Fix a bug in how we generate partition constraints.
Date: Mon, 16 Jan 2017 15:04:38 +0900
Message-ID: <9ce97382-54c8-deb3-9ee9-a2ec271d866b@lab.ntt.co.jp> (raw)
In-Reply-To: <CA+HiwqHtXOnM=Ty1UNkSOT-6274q8LRhHsSRn4eEFuuYMObv+A@mail.gmail.com>
References: <CA+Tgmobaem6_zgnkT-S2jtpWvw+otbtfFjU60jUEQo5DC2xQrQ@mail.gmail.com>
	<20170113200957.7rdnmtiuatxd3ix6@alvherre.pgsql>
	<CA+Tgmobh_cVzo6R+UhM-G6sM_-NLfVYmW8iUZPGQgn0gS5amLw@mail.gmail.com>
	<CA+HiwqHtXOnM=Ty1UNkSOT-6274q8LRhHsSRn4eEFuuYMObv+A@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 2017/01/14 13:36, Amit Langote wrote:
> 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.

And here is the patch.

Thanks,
Amit

Attachments:

  0001-Avoid-code-duplication-in-map_partition_varattnos.patch (text/x-diff, 0B) download

view thread (8+ messages)

Message-ID: <9ce97382-54c8-deb3-9ee9-a2ec271d866b@lab.ntt.co.jp>
Permalink:  ../9ce97382-54c8-deb3-9ee9-a2ec271d866b@lab.ntt.co.jp/
Also on:    postgresql.org/message-id/9ce97382-54c8-deb3-9ee9-a2ec271d866b@lab.ntt.co.jp

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: Langote_Amit_f8@lab.ntt.co.jp, amitlangote09@gmail.com, robertmhaas@gmail.com, alvherre@2ndquadrant.com, pgsql-hackers@postgresql.org
  Subject: Re: [COMMITTERS] pgsql: Fix a bug in how we generate partition constraints.
  In-Reply-To: <9ce97382-54c8-deb3-9ee9-a2ec271d866b@lab.ntt.co.jp>
  References: <CA+Tgmobaem6_zgnkT-S2jtpWvw+otbtfFjU60jUEQo5DC2xQrQ@mail.gmail.com> <20170113200957.7rdnmtiuatxd3ix6@alvherre.pgsql> <CA+Tgmobh_cVzo6R+UhM-G6sM_-NLfVYmW8iUZPGQgn0gS5amLw@mail.gmail.com> <CA+HiwqHtXOnM=Ty1UNkSOT-6274q8LRhHsSRn4eEFuuYMObv+A@mail.gmail.com> <9ce97382-54c8-deb3-9ee9-a2ec271d866b@lab.ntt.co.jp>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox