Add support for ALTER INDEX .. ALTER [COLUMN] col_num {SET,RESET}

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Add support for ALTER INDEX .. ALTER [COLUMN] col_num {SET,RESET}
Дата
Msg-id YXuCDicA8rq4iryZ@paquier.xyz
обсуждение исходный текст
Ответы Re: Add support for ALTER INDEX .. ALTER [COLUMN] col_num {SET,RESET}  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Hi all,

Since 911e702 (13~), it is possible to define opclass parameters for
index attributes as of CREATE INDEX, but we lack an equivalent grammar
for ALTER INDEX.  I was looking at that, and it seems natural to me to
do the same thing as what we do for SET STATISTICS, where we use a
column number to decide which column should be used to set or reset a
parameter.

It happens that most of the infrastructure is already in place to
allow that to work, I just had to push a bit the parser and
tablecmds.c to handle that, thanks to the fact that opclass parameters
are stored in pg_attribute in the same fashion as table parameters,
where we use a simple text array for each param/value pair.  The only
tweak is to go through the correct validation option, aka
index_opclass_options() (this was discussed on the thread that led to
fdd8857).  So this adds much more flexibility to the opclass handling
for indexes.

The attached does the work, with tests and documentation added to all
the places I could think about while reviewing the existing opclass
code for indexes.  There is no need to worry about pg_dump, as opclass
parameters are loaded with CREATE INDEX.

I am adding that to the upcoming CF.  Thoughts?

Thanks,
--
Michael

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Kevin Burke
Дата:
Сообщение: Re: Support for NSS as a libpq TLS backend
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: Skipping logical replication transactions on subscriber side