Prevent dropping the last label from a property graph element Per SQL/PGQ standard, every graph element must have at least one label. When dropping a label from a graph element, ensure that there exists at least one other label on the element. If the label being dropped is the only label on the element, raise an error.
We hold a ShareRowExclusiveLock when modifying a property graph. Hence the label will not be dropped even when multiple labels are being dropped concurrently. Author: Ashutosh Bapat <[email protected]> Author: Satyanarayana Narlapuram <[email protected]> Reported-by: Satyanarayana Narlapuram <[email protected]> Discussion: https://www.postgresql.org/message-id/CAHg+QDeP=mthtv48r23zkmy1sbmckz_l7-z5zknyyw+k0x-...@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/7afa11feca6c4e48d01890580564d55cf226fe02 Modified Files -------------- doc/src/sgml/ref/alter_property_graph.sgml | 4 +- src/backend/commands/propgraphcmds.c | 55 ++++++++++++++++++++-- .../regress/expected/create_property_graph.out | 7 +++ src/test/regress/sql/create_property_graph.sql | 5 ++ 4 files changed, 65 insertions(+), 6 deletions(-)
