agora inbox for pgsql-docs@postgresql.org  
help / color / mirror / Atom feed
ALTER INDEX documentation is incomplete
3+ messages / 3 participants
[nested] [flat]

* ALTER INDEX documentation is incomplete
@ 2024-10-18 10:37  PG Doc comments form <noreply@postgresql.org>
  0 siblings, 1 reply; 3+ messages in thread

From: PG Doc comments form @ 2024-10-18 10:37 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: alvaro@datadoghq.com

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.
Thanks!


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: ALTER INDEX documentation is incomplete
@ 2024-10-19 11:25  Álvaro Herrera <alvherre@alvh.no-ip.org>
  parent: PG Doc comments form <noreply@postgresql.org>
  0 siblings, 1 reply; 3+ messages in thread

From: Álvaro Herrera @ 2024-10-19 11:25 UTC (permalink / raw)
  To: alvaro@datadoghq.com; pgsql-docs@lists.postgresql.org

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)

Attachments:

  [text/x-diff] alterindex.patch (933B, ../../202410191125.ikk6d335ngxo@alvherre.pgsql/2-alterindex.patch)
  download | inline diff:
diff --git a/doc/src/sgml/ref/alter_index.sgml b/doc/src/sgml/ref/alter_index.sgml
index e26efec064..67887dc31e 100644
--- a/doc/src/sgml/ref/alter_index.sgml
+++ b/doc/src/sgml/ref/alter_index.sgml
@@ -87,10 +87,11 @@ ALTER INDEX ALL IN TABLESPACE <replaceable class="parameter">name</replaceable>
    </varlistentry>
 
    <varlistentry>
-    <term><literal>ATTACH PARTITION</literal></term>
+    <term><literal>ATTACH PARTITION <replaceable class="parameter">index_name</replaceable></literal></term>
     <listitem>
      <para>
-      Causes the named index to become attached to the altered index.
+      Causes the possibly schema-qualified named index to become attached
+      to the altered index.
       The named index must be on a partition of the table containing the
       index being altered, and have an equivalent definition.  An attached
       index cannot be dropped by itself, and will automatically be dropped

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: ALTER INDEX documentation is incomplete
@ 2024-10-19 14:44  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Álvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2024-10-19 14:44 UTC (permalink / raw)
  To: Álvaro Herrera <alvherre@alvh.no-ip.org>; +Cc: alvaro@datadoghq.com; pgsql-docs@lists.postgresql.org

=?utf-8?Q?=C3=81lvaro?= Herrera <alvherre@alvh.no-ip.org> writes:
> How about the attached patch?

Instead of

+      Causes the possibly schema-qualified named index to become attached

I think something like

+      Causes the named index (possibly schema-qualified) to become attached

would be more readable and closer to what we write elsewhere.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2024-10-19 14:44 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-10-18 10:37 ALTER INDEX documentation is incomplete PG Doc comments form <noreply@postgresql.org>
2024-10-19 11:25 ` Álvaro Herrera <alvherre@alvh.no-ip.org>
2024-10-19 14:44   ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox