Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t27al-0021Ij-T6 for pgsql-docs@arkaria.postgresql.org; Sat, 19 Oct 2024 11:25:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1t27aj-001eLb-4N for pgsql-docs@arkaria.postgresql.org; Sat, 19 Oct 2024 11:25:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t27ah-001eG8-NM for pgsql-docs@lists.postgresql.org; Sat, 19 Oct 2024 11:25:53 +0000 Received: from fout-a5-smtp.messagingengine.com ([103.168.172.148]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t27ab-001guY-1G for pgsql-docs@lists.postgresql.org; Sat, 19 Oct 2024 11:25:50 +0000 Received: from phl-compute-07.internal (phl-compute-07.phl.internal [10.202.2.47]) by mailfout.phl.internal (Postfix) with ESMTP id 37F0F138016E; Sat, 19 Oct 2024 07:25:43 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-07.internal (MEProxy); Sat, 19 Oct 2024 07:25:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:reply-to :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1729337143; x=1729423543; bh=w cDknGrAkPdRAC5jptNK2rrpgFhzY3wBDqLrvNl+coY=; b=Kqmc2dWBPEICDMZP9 e8HdPb9Tw6dRTYaGlsPreXZ7+9QQNsd/RslRaFxVJn+mGnLhr4ll/5dAvinxPz+M 9D/ky+sWpJXXBzHR69Tstpp2VRcTZUysnHPi34lAgnCjqjbgPRLh5hP3wIky02ND pvQjYa/XxaZk2L68mhZurjQ4evEC4jy5hPfzMqMrDzwW8Wbpphs/uOBhIa8iJjDH BNVC+mnarj/OgE/KSqpRZCP73NyweU8ul/yeBFmM6/ns1oQqeANKjM2k0iTC8kPD ZUHIe2dyJpO1bT70THY+GAQnemBZrRcao0w18SJBoRZkOSOz/ZTroVU+DhC1Jpfp l1cQw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdehhedggeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuf fkgggtugfgjgesmhekreertddtjeenucfhrhhomheplmhlvhgrrhhoucfjvghrrhgvrhgr uceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgheqnecuggftrfgrthhtvg hrnhepfeffjeejkeelffdvteelueelfedvheefkedthedvhedvtdffffetffevtdegveeu necuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrghdpvghnthgvrhhprhhishgvug gsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhho mheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrghdpnhgspghrtghpthhtoh epvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprghlvhgrrhhosegurghtrggu ohhghhhqrdgtohhmpdhrtghpthhtohepphhgshhqlhdqughotghssehlihhsthhsrdhpoh hsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 19 Oct 2024 07:25:42 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1729337140; bh=u80soeblEygu1Cdp/oBOQesvQAqvQDGCthfPfMg+uWo=; h=Date:From:To:Subject:In-Reply-To:From; b=qDHynYPJY0nwntCK4Yor4eLfb3mSF9Jf8yDVXi8bAjkPInJqB3QA+k94ZOGXZhttX O2vONPFtqOLlkzwGdVly2chFujaiUa259z/LIbPl4kQrWSb8LVcjB7NviHrpIbwSZt q8xguZCNKy0uYLhbUoM8KFEG6giZJ5uQK/Fpa44EWrN8gInqLoq4JR3E21wWV+dqi2 um8xgS8xJjlupNafddhbaf66dMsS71LYwbdZ6oXhcn0LWgUbI05Ff2qafJHTBmbOM2 s1xADLEVaxeLungSlvPQXEgUBpaHLKz/Z8LOrnv+1ml0GoY9SSi5IYf0NSogPOsa4P 0NHRTn5f8DXWg== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 31C6BA4; Sat, 19 Oct 2024 13:25:40 +0200 (CEST) Date: Sat, 19 Oct 2024 13:25:40 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: alvaro@datadoghq.com, pgsql-docs@lists.postgresql.org Subject: Re: ALTER INDEX documentation is incomplete Message-ID: <202410191125.ikk6d335ngxo@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="updtkvfwtzfuavk7" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <172924785099.698.15236991344616673753@wrigleys.postgresql.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --updtkvfwtzfuavk7 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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) --updtkvfwtzfuavk7 Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="alterindex.patch" 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 name - ATTACH PARTITION + ATTACH PARTITION index_name - 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 --updtkvfwtzfuavk7--