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.96) (envelope-from ) id 1wFoYf-005a8C-04 for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Apr 2026 07:33:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wFoYc-000Omr-2n for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Apr 2026 07:33:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wFoYc-000OmS-1r for pgsql-hackers@lists.postgresql.org; Thu, 23 Apr 2026 07:33:06 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wFoYX-00000002buA-1oLz for pgsql-hackers@lists.postgresql.org; Thu, 23 Apr 2026 07:33:06 +0000 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-43cfbd17589so5035683f8f.0 for ; Thu, 23 Apr 2026 00:33:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1776929580; cv=none; d=google.com; s=arc-20240605; b=CNujfoTcAIfUhNmtvvKqJDndf9P8cZ8gShKcU0Sn2rsaP1zpYZWRCg0CekvUxTCyyZ 6IiQDXeG4FGhmpKaDwYXJqjxGPQ1ethj0vo39BOkDrPEitjKf9NUaJsMmCX6R9dSZW5B bC44Hu7ckeDiqPEPkRJdzlzwN8bl2GJM0akP2kGNA7Pb4YbyoaWDhw3DeYGQDR+R6pxt NlfmATap2XtHZq0dfR7oD+38t9heXi5T0Xai1wV+dkarweN4o+U51wL2tlgEYZgoDVTS sFtzABg2tiZE/16a67p4HjBXfVJxi5VKI+Fa8ZkJjuvhj6RPh7elYGI/eVUJGhGgE1h/ 7DnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=zuW0QGMBWImZEbhkAiqxlwCyrnz+F72uk52Or0iqFSk=; fh=PDhzRmLFhJQgKl2kpY6iqaoiggk+rKjB8rXL7ERgOws=; b=EZcAMUwGbNk+zMrfW8aEuYoJ7MJZb65oyJxWqJRiI+GHVDNrjfsDJbccPUpwvI00qv vpnHFzQikEO9iicnqHcXqZK292P6Tj0xMEr8dkBN4KeU/WGCS6T/jy8Bs2YR4yGsUvmb rO7GABDr5g8zUzm8oT5vEqOQMmDIL6PYfNBOnrFdfYunKER1p6egLT3aAN7a7BAoCo28 NGIybqirIF7u/nIPJYaUp/lUXEXHHcdD/WiV/XqZutO5PkngNisgyM6I0+1el6RFjDKY +dJKZSt+pJL8nn1KtGouGvkCYbx6ZVwJ2GxCb0ZXUrm8CumOjc0oT2ghRO6ybp+b/nMt wRPA==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776929580; x=1777534380; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=zuW0QGMBWImZEbhkAiqxlwCyrnz+F72uk52Or0iqFSk=; b=XKq4eb+fsNVNHMAXOwOlbzWX6jVm6MAExiLbD7cjD0XCNXTASSxhN8qbkSxGW3QnBs T7GuskqfIZu8MyKPKewlkNMitNnByyKKg64AunYmYv6UpFQyRA1rUt6rOEKK1f8xtmth wX/ARyM7q1kzwOVL4RPrhny6KLotjSAw+C8YvrD9mnGcJ1z6MFRSSUEfuLai3sC4z0Oy T/kkqOrEkVWYN5q6uVlfPBf2g7gWrCwxtOD5ikey9+tB7lZut9MRJ8EFUyr/uuwfx1NA Fn5Z0S9avMZhMrUNLk1nHhH85OO/WccRR/x9a13N7EAoqTQ7av6o6MtLa+WsXM4XmtOX aDLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776929580; x=1777534380; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=zuW0QGMBWImZEbhkAiqxlwCyrnz+F72uk52Or0iqFSk=; b=WoCyAIFJp59WQJUpUTWZpjAIW1qkVH1vkii4ocBXMB0cYBlVrwJ1f0HH3rYrvCcjuw U4NI2Pc/faafit8dtHdh8AikgDuwsxUXwrW438gxz9hPbmurxONDraDtO205XTdGOIqU +RVXIE40CZvxnUdXp+K/G9XxLP+5kIt4thJpDqinGYidP4BeIAKk72BmypAPmLWPxydP IVjB8g6dLxGhTEoIts1vCm+Udv/9RznsLIg/Xj/9rPUUilXEZ8nB8g9FbY/YeoCWjOtg r2CMtWPSq5sCOalAjFrf+fgI0+Yq/XzAlbLx737bAtyyfToEDCtLOVuP+65aONB908qS u2Tg== X-Gm-Message-State: AOJu0YyF7uIEbsbC+O3PDrLt/Y9kqvBOqiYWvpXqllpVe45qZ8mVzGJB PFhsAqVe2zOBPCpqG0LBD1z+hRA5UmoJwhxko1b1U1i0YKcEgtydxgCCk5HSP/NH8uXGKlg/8fF 8DE6QS0JfxraRK6gYTiC8fAh3KpRjxak= X-Gm-Gg: AeBDiev3ycsWh40LKc7j/8g/ZvMsAZsvsA+WB7FboZWBAOISGUo2O6Cuj6aOsveiPpY XxpyTZ71YI9yqUBvTZBE5Ub/FduV3g5KbLbJMTGj9cFwGKjg33ofbOuKo81M2G9UOuyjAJ76TjH rFkgbfmLQCa5SRcxIvamSVc9Ru9iHf8z+c7ryypj3xWVJJi54EDrlnkebtKPH6bOWnNJ9RrSKs8 GxX6ESGRRYvQdg9ePTU7XTuS7VXLg/yMcetS8MP0/fGiwvdaD4kFswZOH4kli7kbb3ezjLGLbrf YC5+1blJ96HTj1m6Ux9CaIOG20ZzuBDZv/lr/AZrRCPt6olRs7YrAQUVfPPLhA== X-Received: by 2002:a5d:5f89:0:b0:441:1cf9:4f06 with SMTP id ffacd0b85a97d-4411cf94f2cmr19419943f8f.31.1776929579933; Thu, 23 Apr 2026 00:32:59 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ashutosh Bapat Date: Thu, 23 Apr 2026 13:02:47 +0530 X-Gm-Features: AQROBzCwzJ0Hx8Iu8oumgF_vetKqqktqQoxCIizKVUfVz_tym05OUXXpkcXO6zc Message-ID: Subject: Re: [Patch] Block ALTER TABLE RENAME COLUMN when column is used by property graph To: SATYANARAYANA NARLAPURAM Cc: PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Apr 23, 2026 at 12:23=E2=80=AFPM SATYANARAYANA NARLAPURAM wrote: > > Hi hackers, > > When a table column is referenced by a property graph, the property > name stored in pg_propgraph_property.pgpname would become stale after > a column rename. This caused GRAPH_TABLE queries to fail with the new > column name ("property does not exist") while the old (dead) name > continued to work. pg_get_propgraphdef() would also emit confusing > output like "new_col AS old_col". This behaviour is inline with the behaviour of view. #create view vt as select a from t1; CREATE VIEW #\d+ vt View "public.vt" Column | Type | Collation | Nullable | Default | Storage | Description --------+---------+-----------+----------+---------+---------+------------- a | integer | | | | plain | View definition: SELECT a FROM t1; #alter table t1 rename column a TO aa; ALTER TABLE #\d+ vt View "public.vt" Column | Type | Collation | Nullable | Default | Storage | Description --------+---------+-----------+----------+---------+---------+------------- a | integer | | | | plain | View definition: SELECT aa AS a FROM t1; Name of the property is derived from the name of the column it references if the property name is not specified at the time of creating the property. But these two are different. Changing column name can not be expected to change the property name automatically. If two elements have the same label, the set of property names associated with that label is expected to be the same for those two elements as well. --=20 Best Wishes, Ashutosh Bapat