agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
pgsql: Prevent dropping the last label from a property graph element
2+ messages / 1 participants
[nested] [flat]

* pgsql: Prevent dropping the last label from a property graph element
@ 2026-07-03 10:17  Peter Eisentraut <peter@eisentraut.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Eisentraut @ 2026-07-03 10:17 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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 <ashutosh.bapat.oss@gmail.com>
Author: Satyanarayana Narlapuram <satyanarlapuram@gmail.com>
Reported-by: Satyanarayana Narlapuram <satyanarlapuram@gmail.com>
Discussion: https://www.postgresql.org/message-id/CAHg+QDeP=mTHTV48R23zKMy1SBmCKZ_L7-z5zKnYyw+K0x-gCg@mail.gmail...

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Prevent dropping the last label from a property graph element
@ 2026-07-03 10:17  Peter Eisentraut <peter@eisentraut.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Eisentraut @ 2026-07-03 10:17 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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 <ashutosh.bapat.oss@gmail.com>
Author: Satyanarayana Narlapuram <satyanarlapuram@gmail.com>
Reported-by: Satyanarayana Narlapuram <satyanarlapuram@gmail.com>
Discussion: https://www.postgresql.org/message-id/CAHg+QDeP=mTHTV48R23zKMy1SBmCKZ_L7-z5zKnYyw+K0x-gCg@mail.gmail...

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ac0ad6a7c9d1f7c0d82696260fdcb2d09a8962c1

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-07-03 10:17 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-07-03 10:17 pgsql: Prevent dropping the last label from a property graph element Peter Eisentraut <peter@eisentraut.org>
2026-07-03 10:17 pgsql: Prevent dropping the last label from a property graph element Peter Eisentraut <peter@eisentraut.org>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox