Re: INDEX with optional storage parameter value
От | Bruce Momjian |
---|---|
Тема | Re: INDEX with optional storage parameter value |
Дата | |
Msg-id | 20200627211423.GG16644@momjian.us обсуждение исходный текст |
Ответ на | INDEX with optional storage parameter value (PG Doc comments form <noreply@postgresql.org>) |
Ответы |
Re: INDEX with optional storage parameter value
Re: INDEX with optional storage parameter value |
Список | pgsql-docs |
On Mon, Jun 22, 2020 at 01:13:52PM +0000, PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/12/sql-createindex.html > Description: > > Hello! > I noticed an slight inaccuracy in the documentation for CREATE INDEX and > ALTER INDEX: > > CREATE INDEX ... [ WITH ( storage_parameter = value [, ... ] ) ] > ALTER INDEX [ IF EXISTS ] name SET ( storage_parameter = value [, ... ] ) > > In indices, as in tables, you can omit the вoolean value for a parameter. > For example: > > CREATE INDEX ON public.testtable USING GIN (c1) WITH (fastupdate); > ALTER INDEX testtable_c1_idx SET (fastupdate); > > It might be more correct to use the construct from CREATE TABLE: > > storage_parameter [= value] [, ... ] Yes, I see that: CREATE TABLE testtable (c1 JSONB); CREATE INDEX ON public.testtable USING GIN (c1) WITH (fastupdate = true); CREATE INDEX ON public.testtable USING GIN (c1) WITH (fastupdate = false); CREATE INDEX ON public.testtable USING GIN (c1) WITH (fastupdate); \d testtable Table "public.testtable" Column | Type | Collation | Nullable | Default --------+-------+-----------+----------+--------- c1 | jsonb | | | Indexes: "testtable_c1_idx" gin (c1) WITH (fastupdate='true') "testtable_c1_idx1" gin (c1) WITH (fastupdate='false') "testtable_c1_idx2" gin (c1) WITH (fastupdate='true') I found a few more places that also didn't properly document this; patch attached. -- Bruce Momjian <bruce@momjian.us> https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee
Вложения
В списке pgsql-docs по дате отправления: