Re: ALTER INDEX documentation is incomplete

From: Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: alvaro(at)datadoghq(dot)com, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: ALTER INDEX documentation is incomplete
Date: 2024-10-19 11:25:40
Message-ID: 202410191125.ikk6d335ngxo@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Hello Alvaro,

On 2024-Oct-18, PG Doc comments form wrote:

> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/17/sql-alterindex.html
> Description:
>
> I am trying to find out whether the syntax `ALTER INDEX name ATTACH
> PARTITION index_name` accepts a schema-qualified index_name. However, there
> is no further reference to the index_name variable in the rest of the page.
> I believe this variable should be referenced in the Parameters section.

Hmm, you're right. It can be schema-qualified btw:

create table datadog (a int) partition by list (a);
-- CREATE TABLE
create index on only datadog (a);
-- CREATE INDEX
create schema test
create table datadog1 partition of public.datadog for values in (1)
create index on datadog1 (a);
-- CREATE SCHEMA
alter index datadog_a_idx attach partition test.datadog1_a_idx;
-- ALTER INDEX

How about the attached patch?

Regards

--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"I dream about dreams about dreams", sang the nightingale
under the pale moon (Sandman)

Attachment Content-Type Size
alterindex.patch text/x-diff 934 bytes

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2024-10-19 14:44:56 Re: ALTER INDEX documentation is incomplete
Previous Message Laurenz Albe 2024-10-18 13:29:52 Re: Logical replication - initial data synchronization