From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | galiev_mr(at)taximaxim(dot)ru, pgsql-docs(at)lists(dot)postgresql(dot)org |
Subject: | Re: INDEX with optional storage parameter value |
Date: | 2020-06-27 21:14:23 |
Message-ID: | 20200627211423.GG16644@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)momjian(dot)us> https://momjian.us
EnterpriseDB https://enterprisedb.com
The usefulness of a cup is in its emptiness, Bruce Lee
Attachment | Content-Type | Size |
---|---|---|
storage.diff | text/x-diff | 6.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | PG Doc comments form | 2020-06-28 20:42:10 | reindex database |
Previous Message | Tomas Vondra | 2020-06-27 10:41:41 | Re: Default setting for enable_hashagg_disk |