public inbox for [email protected]
help / color / mirror / Atom feedIncorrect SQL on CREATE INDEX page
3+ messages / 3 participants
[nested] [flat]
* Incorrect SQL on CREATE INDEX page
@ 2010-03-17 14:38 Josh Kupershmidt <[email protected]>
0 siblings, 1 reply; 3+ messages in thread
From: Josh Kupershmidt @ 2010-03-17 14:38 UTC (permalink / raw)
To: 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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Incorrect SQL on CREATE INDEX page
@ 2010-03-17 15:13 Tom Lane <[email protected]>
parent: Josh Kupershmidt <[email protected]>
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 2010-03-17 15:13 UTC (permalink / raw)
To: Josh Kupershmidt <[email protected]>; +Cc: pgsql-docs
Josh Kupershmidt <[email protected]> writes:
> 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.
Ooops. You're right, that's definitely a mistake. Will fix.
> 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?
It's pointed out further up the page that btree is the default access
method.
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Incorrect SQL on CREATE INDEX page
@ 2010-03-17 15:38 Roderick A. Anderson <[email protected]>
parent: Tom Lane <[email protected]>
0 siblings, 0 replies; 3+ messages in thread
From: Roderick A. Anderson @ 2010-03-17 15:38 UTC (permalink / raw)
To: pgsql-docs
Tom Lane wrote:
> Josh Kupershmidt <[email protected]> writes:
<snip />
>> 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?
>
> It's pointed out further up the page that btree is the default access
> method.
Maybe change it to " ... B-tree index (the default) on the column ... "
for those of us with short memories.
\\||/
Rod
--
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2010-03-17 15:38 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-03-17 14:38 Incorrect SQL on CREATE INDEX page Josh Kupershmidt <[email protected]>
2010-03-17 15:13 ` Tom Lane <[email protected]>
2010-03-17 15:38 ` Roderick A. Anderson <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox