Re: [PATCH] Opclass parameters

From: Oleg Bartunov <obartunov(at)gmail(dot)com>
To: Nikolay Shaplov <dhyan(at)nataraj(dot)su>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Opclass parameters
Date: 2018-03-01 20:02:20
Message-ID: CAF4Au4xedPHJQyN60x+6giMpEyLdKn7jFR85_kzaApy9BptRUw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 28, 2018 at 5:46 PM, Nikolay Shaplov <dhyan(at)nataraj(dot)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 !

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Steele 2018-03-01 20:05:54 Re: Re: Fwd: [BUGS] pg_trgm word_similarity inconsistencies or bug
Previous Message Andres Freund 2018-03-01 20:01:29 Re: Protect syscache from bloating with negative cache entries