move PartitionBoundInfo creation code

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: move PartitionBoundInfo creation code
Date: 2018-11-01 03:58:29
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


Currently, the code that creates a PartitionBoundInfo struct from the
PartitionBoundSpec nodes of constituent partitions read from the catalog
is in RelationBuildPartitionDesc that's in partcache.c. I think that
da6f3e45dd that moved around the partitioning code [1] really missed the
opportunity to move the aforementioned code into partbounds.c. I think
there is quite a bit of logic contained in that code that can aptly be
said to belong in partbounds.c. Also, if factored out into a function of
its own with a proper interface, it could be useful to other callers that
may want to build it for, say, fake partitions [2] which are not real

Attached find a patch that does such refactoring, along with making some
functions in partbounds.c that are not needed outside static.




Attachment Content-Type Size
v1-0001-Move-PartitionBoundInfo-creation-code-to-partboun.patch text/plain 36.1 KB


Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-11-01 04:02:22 Re: move PartitionBoundInfo creation code
Previous Message Amit Langote 2018-11-01 03:39:16 Re: Getting ERROR: could not open file "base/13164/t3_16388" with partition table with ON COMMIT