| From: | SATYANARAYANA NARLAPURAM <satyanarlapuram(at)gmail(dot)com> |
|---|---|
| To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> |
| Subject: | [Patch] Block ALTER TABLE RENAME COLUMN when column is used by property graph |
| Date: | 2026-04-23 06:53:45 |
| Message-ID: | CAHg+QDckbpX_Lk-6bz5JA+Bd1+KfsO0=9r0hPZt8X+PX6kbWFw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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".
Fix by checking pg_depend in renameatt_internal() for
PropgraphLabelPropertyRelationId entries that reference the column
being renamed. If any exist, raise an error directing the user to
drop the property graph first.
Thanks,
Satya
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Block-ALTER-TABLE-RENAME-COLUMN-when-column-is-used-.patch | application/octet-stream | 6.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | John Naylor | 2026-04-23 06:54:20 | Re: [PATCH] Fix duplicate errmsg in ALTER TABLE SPLIT PARTITION |
| Previous Message | Chao Li | 2026-04-23 06:50:22 | Re: Warn on missing replica identity in CREATE/ALTER PUBLICATION |