Fix handling of dropping a property not associated with the given label
Peter Eisentraut <peter@eisentraut.org>
Fix handling of dropping a property not associated with the given label When dropping a property by name from a label, the code checked only whether the property existed in the graph's property catalog. It did not verify that the property was actually associated with the given label, resulting in passing InvalidOid to performDeletion(). Fix it by explicilty checking the label property association. While at it also rearrange the code so as to avoid multiple ereport calls for the same error in the same block. Author: Chao Li <lic@highgo.com> Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/1DA5D52A-4AFA-426E-83F7-42ED974D682B%40gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/propgraphcmds.c | modified | +19 −28 |
| src/test/regress/expected/create_property_graph.out | modified | +2 −0 |
| src/test/regress/sql/create_property_graph.sql | modified | +1 −0 |
Discussion
- Property graph: fix error handling when dropping non-existent label property 8 messages · 2026-04-24 → 2026-07-03