Re: [PATCH] use separate PartitionedRelOptions structure to storepartitioned table options - Mailing list pgsql-hackers

From Amit Langote
Subject Re: [PATCH] use separate PartitionedRelOptions structure to storepartitioned table options
Date
Msg-id CA+HiwqHo6ghhD93Y9T3psuceOjwrhczh8S0Y0iQz5+zr-fOw5A@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] use separate PartitionedRelOptions structure to store partitioned table options  (Nikolay Shaplov <dhyan@nataraj.su>)
Responses Re: [PATCH] use separate PartitionedRelOptions structure to store partitioned table options
List pgsql-hackers
Hello,

On Mon, Oct 7, 2019 at 6:43 PM Nikolay Shaplov <dhyan@nataraj.su> wrote:
> В письме от понедельник, 7 октября 2019 г. 14:57:14 MSK пользователь Michael
> Paquier написал:
> > On Sun, Oct 06, 2019 at 03:47:46PM +0300, Nikolay Shaplov wrote:
> > > The idea of this patch is following: If you read the code, partitioned
> > > tables do not have any options (you will not find RELOPT_KIND_PARTITIONED
> > > in boolRelOpts, intRelOpts, realRelOpts, stringRelOpts and enumRelOpts in
> > > reloption.c), but it uses StdRdOptions to store them (these no options).
> > I am not even sure that we actually need that.  What kind of reloption
> > you would think would suit into this subset?
>
> Actually I do not know. But the author of partitioned patch, added a stub for
> partitioned tables to have some reloptions in future. But this stub is
> designed to use StdRdOptions. Which is not correct, as I presume. So here I am
> correcting the stub.

I wrote the patch that introduced RELOPT_KIND_PARTITIONED.  Yes, it
was added as a stub relopt_kind to eventually apply to reloptions that
could be sensibly applied to partitioned tables.  We never got around
to working on making the existing reloptions relevant to partitioned
tables, nor did we add any new partitioned table-specific reloptions,
so it remained an unused relopt_kind.

IIUC, this patch invents PartitionedRelOptions as the binary
representation for future RELOPT_KIND_PARTITIONED parameters.  As long
as others are on board with using different *Options structs for
different object kinds, I see no problem with this idea.

Thanks,
Amit



pgsql-hackers by date:

Previous
From: Joe Nelson
Date:
Subject: Re: Change atoi to strtol in same place
Next
From: Craig Ringer
Date:
Subject: Re: Regarding extension