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: 0001-Block-ALTER-TABLE-RENAME-COLUMN-when-column-is-used-.patch
Description: Binary data

Reply via email to