"DROP INDEX" correction

Started by Oto Brglezover 6 years ago2 messagesdocs
Jump to latest
#1Oto Brglez
otobrglez@gmail.com

Hello people!

I'm new to this place and this is obviously my first message to you guys.

I've been using PostgreSQL for years now, deeply like it and I came to a
point when I wish to give some of this love back. :)

So; I'm reaching out this mailing list - hopefully the right one - because
we found a small "bug" or should I rather say missing information in the
documentation.

Inside the documentation for DROP INDEX (
https://www.postgresql.org/docs/9.6/sql-dropindex.html) - pointing to 9.6
version - there is no information that if you use DROP INDEX with
CONCURRENTLY that you can't drop several indices at once. Meaning that this
does not work:

DROP INDEX CONCURRENTLY IF EXISTS my_index_one, my_index_two;

PostgreSQL itself will raise exception

PG::FeatureNotSupported: ERROR: DROP INDEX CONCURRENTLY does not support
dropping multiple objects

Although this is the correct statement per synopsis.

DROP INDEX [ CONCURRENTLY ] [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT
]

Proposal.

I suggest that you add a statement/explanation under Parameters

CONCURRENTLY that would say something like

"DROP INDEX with CONCURRENTLY can only accept one index."

I hope that this message will be helpful to someone and I wish you a
pleasant day!

P.s.: If I can make this recommendation in the form of a patch or something
please point me in the right direction.

Regards,

- Oto Brglez

#2Michael Paquier
michael@paquier.xyz
In reply to: Oto Brglez (#1)
Re: "DROP INDEX" correction

Hi Oto,

On Wed, Oct 02, 2019 at 09:55:14AM +0200, Oto Brglez wrote:

I suggest that you add a statement/explanation under Parameters

CONCURRENTLY that would say something like

"DROP INDEX with CONCURRENTLY can only accept one index."

I hope that this message will be helpful to someone and I wish you a
pleasant day!

The documentation of DROP INDEX includes already the following
sentence in the paragraph for CONCURRENTLY:
https://www.postgresql.org/docs/devel/sql-dropindex.html
"Only one index name can be specified"
--
Michael