Re: [PATCH] Opclass parameters - Mailing list pgsql-hackers

From Oleg Bartunov
Subject Re: [PATCH] Opclass parameters
Date
Msg-id CAF4Au4xedPHJQyN60x+6giMpEyLdKn7jFR85_kzaApy9BptRUw@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Opclass parameters  (Nikolay Shaplov <dhyan@nataraj.su>)
Responses Re: [PATCH] Opclass parameters  (Nikolay Shaplov <dhyan@nataraj.su>)
List pgsql-hackers
On Wed, Feb 28, 2018 at 5:46 PM, Nikolay Shaplov <dhyan@nataraj.su> wrote:

> Concerning the patch that you've provided. I've just have a short look. But I
> already have some question.
>
> 1. I've seen you've added a new attribute into pg_index. Why??!!
> As far as I can get, if have index built on several columns (A1, A2, A3) you
> can set, own opclass for each column. And set individual options for each
> opclass if we are speaking about options. So I would expect to have these
> options not in pg_index, but in pg_attribute. And we already have one there:
> attoptions.I just do not get how you have come to per-index options. May be I
> should read code more attentively...

this is what we want to discuss.

>
>
> 2. Your patch does not provide any example of your new tool usage. In my
> prototype patch I've shown the implementation of opclass options for intarray.
> May be you should do the same. (Use my example it will be more easy then do it
> from scratch). It will give more understanding of how this improvement can be
> used.

Hey, look on patches, there are many examples  !

>
> 3.
>
> --- a/src/test/regress/expected/btree_index.out
> +++ b/src/test/regress/expected/btree_index.out
> @@ -150,3 +150,8 @@ vacuum btree_tall_tbl;
>  -- need to insert some rows to cause the fast root page to split.
>  insert into btree_tall_tbl (id, t)
>    select g, repeat('x', 100) from generate_series(1, 500) g;
> +-- Test unsupported btree opclass parameters
> +create index on btree_tall_tbl (id int4_ops(foo=1));
> +ERROR:  access method "btree" does not support opclass options
> +create index on btree_tall_tbl (id default(foo=1));
> +ERROR:  access method "btree" does not support opclass options
>
> Are you sure we really need these in postgres???

Hey, this is a just a test to check unsupported opclass options !


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Protect syscache from bloating with negative cache entries
Next
From: David Steele
Date:
Subject: Re: Re: [HACKERS] plpgsql - additional extra checks