From: Голубева Яна <ishsha@yandex.ru>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Define hash partition for certain column values
Date: Mon, 11 Jan 2021 08:56:52 +0300
Message-ID: <2278581610342154@mail.yandex.ru> (raw)
<div>Hello,</div><div> </div><div>I've found in source code that there is a function satisfies_hash_partition(oid, modulus, remainder, column_values[]) which allows to check if the certain column value will be placed in the certain partition.</div><div>I' d like to know if there is an opportunity not to check the certain partition but to define which partition will be the certain column value placed in. Something like define_hash_partition(oid, column_values[]) which returns the remainder value.</div><div>It is not very convenient to use satisfies_hash_partition for this purpose because there could be a lot of partitions and it takes time to check each one of them.</div><div>If there isn't such opportunity for now I think it would be useful to have such feature in the next releases. What do you think about it?</div><div> </div><div>Thank you!</div><div>Iana Golubeva</div>
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-general@postgresql.org
Cc: ishsha@yandex.ru
Subject: Re: Define hash partition for certain column values
In-Reply-To: <2278581610342154@mail.yandex.ru>
References: <2278581610342154@mail.yandex.ru>
* 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