On Tue, Mar 1, 2022 at 9:37 AM Andrew Zakharov <Andrew898@xxxxxxx> wrote:
David, - yes, creation composite foreign/primary key is not a problem. But the main question is what method should I use for partitioning by composite key gid, region_code?
The convention here is to inline or bottom-post responses.
Your original plan - list partitions by region_code. You couldn't do that before because you weren't seeing the region_code as being part of your PK and all partition columns must be part of the PK. My suggestion is that instead of figuring out how to work around that limitation (not that I think there is a good one to be had) you accept it and just add region_code to the PK.
David J.