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 1wFqNq-005cSa-2N for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Apr 2026 09:30:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wFqNp-0011nI-3C for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Apr 2026 09:30:05 +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.96) (envelope-from ) id 1wFqNp-0011nA-2K for pgsql-hackers@lists.postgresql.org; Thu, 23 Apr 2026 09:30:05 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wFqNn-00000002OUK-2qhl for pgsql-hackers@lists.postgresql.org; Thu, 23 Apr 2026 09:30:04 +0000 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4852a9c6309so59088265e9.0 for ; Thu, 23 Apr 2026 02:30:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1776936603; cv=none; d=google.com; s=arc-20240605; b=WydWYK7ZdYXManQKP96LfvY8Hnx2KvcMmUe/URTUw85a8HppoOR/as2C0YGqYTcqSb gdEFo0E1hFNl4JCTf144D0nd2iZlkxdC7MOAgFgP/k8YtRZ/ZGZg52SDAYxShXFRGMcX c8ji3BpEhCmIPKDMaJU8yMkH4mexM5Z1fhqucqUZvrFsf+mY0pocER9tWhPg3xkBk/Nq /Fmv6aRqGif1iw1ZSNjq3PnEvB6xIe0WasT/x21vsGeRixbAQ5XVi6ujMl2rVWoCya8V rLCYn6lZoyxe2vCZP1JPt1pNLuUfkNNVnykIWRUKqLd5K8HxnpwMRSCQGszwwl7Of0Ny k2AA== 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=efXsIhCNmf3XTDi2N1cUO+9GCHDay6f6kk5xpA68yNs=; fh=PDhzRmLFhJQgKl2kpY6iqaoiggk+rKjB8rXL7ERgOws=; b=V7VR4HWVAX7rdppyVDd6H2LwYOKhEuPL/0w4IYizkYa9tyfbA2cr/nJ+5f8M96sVUx xITJF1PASZCOe11NR2Be7A4LshB8dn1K47yvNarO4lKMhpVELJKxLtEd17QC2hs8To1G 4hBSM6GPGyVW+U+hqOb8LHBACjkWs4UAux/Grpt10Nbnk0yB1eH5XVBH8JoNur/tBJ+c 9S7k39bBBQA5gCRib+HXvFRcRzYfmPaB/qt5yHByO0GRoBH0ZWMLOxNGOA4Wi1vsVYbO Bkn3QGt0mWIvBGI9AYL0abgGccrMBnVZsIIBSaOOXGfUnFWA44fVaA+hmHlXEvPlgxTw XfzQ==; 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=1776936603; x=1777541403; 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=efXsIhCNmf3XTDi2N1cUO+9GCHDay6f6kk5xpA68yNs=; b=ststieBxzfOE3GdTUju/fXVff3Dqk4drjxHHrpdgbjWsLy1Zrzq0fHXpjZPltO9W5U r6ZH6/zYlKtVpWygfrsfO0ICuCPOWT6mGd4grGSs+DzP0wFoMfrHVNa0NGGxRKV0U9/5 4G2K4o05PPcpVQWa8/z13ULdQbk39ARfDXnEHhYK3rBpl/iAISMKmkr3IwLAufLPlzkl q6+SQWdRrYJPXTE08FduGoQyQPrt8Oyfi+/J+pm1KZablge2pVNaEnr3/helh3oT/h8A o6InsKt0igJsGF7ra4pEudp1tddBZT5MpJ2i4bmCUJdv9DiZrX1mMBErzvGuU+29UqpG b4wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776936603; x=1777541403; 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=efXsIhCNmf3XTDi2N1cUO+9GCHDay6f6kk5xpA68yNs=; b=ill84E5LCe6szY6lL9C+O9mhgUaWGo4UwTBDg4l165JvPA7FDHAvxRGQhP85kNuvJw FDi63cXEjfeHGmUv5C5L5UOE4W99R54yMnneaLtfKV9M+WyM+WAghEJTch/DrTj6RfmM B2biJ3vS6n1IIwS1171ZhLC/6PjdSHsXTbbl9VN1HGrfkNjrlXsYnejSfLv9AAcFr4HR zjgqDNTiNXjyUz1FC7DPVMCro+L7aBscdM48qcsxOT720KrRoR3CNGrz/ZzqCt5VX0w+ seDb49WxHCxF1uP94wTIGdNBFDx0QGb5GW1uac6aXUiGgK2yaX3ZhlCs4h3sw8Q+jpS7 hIfw== X-Gm-Message-State: AOJu0YyeINksP1Z/wKyN6OPbOFmssYP1tZEaFReYZ8CdIQxHG8+FWcKL CI9JXlLVcc59L/yEJ0ZzTX4WgwDo3xiJSKFpzPRVMCKTa3DMInVglpqBK84hkSupKI6R4ZOGYej 14rQh7MYbNQy13y8sP99suI9c8UHnVqE= X-Gm-Gg: AeBDieuckMOmZioXpo5PD0RsFJ6RwBWb3MF3En+ZRZ4nb76YDa+CD2SmGk7VTI0liiW C6apwH5Bb5a5oEMoU04qnNHCA2o3hrXoB2fkHooQoDFKr9r+EcQytvLi7B8ihzNz88GiiEqE2L4 umA4rtmOhSWlX2rYKxj6R1vW4jEPEUt1p37nHdmU6ybONA+mvHzRuyb3Hww8AsJ9JmxmmyMOu8I J1mOxI0EXyCpNwYs8EFleBTuMfxaIvAohcaQd75oWTq9Jcujkm506zOWI1zP1iszF22wzcZhR5J aG0nBebHQyY25fjqN328Fv3d8jZhSZfnioUPWj5KUlveyGVz0KJ/eapzXmmwMw== X-Received: by 2002:a05:600c:4707:b0:488:bfc3:efc with SMTP id 5b1f17b1804b1-488fb6e8eb5mr374439145e9.0.1776936602402; Thu, 23 Apr 2026 02:30:02 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ashutosh Bapat Date: Thu, 23 Apr 2026 14:59:49 +0530 X-Gm-Features: AQROBzA98dBWk3aFHU7aUwmysTLFfRrX9A8Hntw3dl9nJ72XkLp3oRQdNm8TqEs 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 1:09=E2=80=AFPM SATYANARAYANA NARLAPURAM wrote: > > Hi > > On Thu, Apr 23, 2026 at 12:33=E2=80=AFAM Ashutosh Bapat wrote: >> >> 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 | Descripti= on >> --------+---------+-----------+----------+---------+---------+----------= --- >> 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 | Descripti= on >> --------+---------+-----------+----------+---------+---------+----------= --- >> 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. > > > Ashutosh, should we document this or it is a well known fact and not need= ed? Asking in the context of Graphs, not views. I don't think we need to document it. -- Best Wishes, Ashutosh Bapat