Incorrect SQL on CREATE INDEX page

From: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
To: pgsql-docs(at)postgresql(dot)org
Subject: Incorrect SQL on CREATE INDEX page
Date: 2010-03-17 14:38:59
Message-ID: 4ec1cf761003170738m5ec60f66o37676c7c939d0b79@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

In the "Examples" section of the page for CREATE INDEX:
http://www.postgresql.org/docs/current/static/sql-createindex.html
it says:
To create a GIN index with fast updates disabled:
CREATE INDEX gin_idx ON documents_table (locations) WITH (fastupdate = off);

This SQL fails with 'ERROR: unrecognized parameter "fastupdate"', as
it is missing the USING clause. Correct syntax should be:
CREATE INDEX gin_idx ON documents_table USING gin(locations) WITH
(fastupdate = off);

Also, a more minor quibble about the same section: the first example says:

To create a B-tree index on the column title in the table films:
CREATE UNIQUE INDEX title_idx ON films (title);

Perhaps the mention of "B-tree" should be omitted here, since "USING
btree" is not actually used in the SQL provided. Or is there an
explicit guarantee that CREATE UNIQUE INDEX will always use a B-Tree
documented somewhere?

Josh

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2010-03-17 15:13:45 Re: Incorrect SQL on CREATE INDEX page
Previous Message Simon Riggs 2010-03-17 10:49:11 Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL