From 73dfe79fd6034b1e7e41e83d9c82c166dba8eb67 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 6 Jul 2026 11:44:55 +0200 Subject: [PATCH] Remove apparent support for SECURITY LABEL ON PROPERTY GRAPH Commit 2f094e7ac69 added a mention of SECURITY LABEL ON PROPERTY GRAPH to the SECURITY LABEL reference page, and it added support to psql tab completion. However, security labels on property graphs are not actually supported (per SecLabelSupportsObjectType()). The syntax does work, but that is just a result of how gram.y is factored. We don't document or tab-complete the syntax of SECURITY LABEL for other object types that are not actually supported, so it was inconsistent to do this for property graphs. Thus, remove this. Reported-by: Noah Misch Discussion: https://www.postgresql.org/message-id/flat/20260704221210.08.noahmisch%40microsoft.com --- doc/src/sgml/ref/security_label.sgml | 1 - src/bin/psql/tab-complete.in.c | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/doc/src/sgml/ref/security_label.sgml b/doc/src/sgml/ref/security_label.sgml index c112f7a08a7..aa45c0af248 100644 --- a/doc/src/sgml/ref/security_label.sgml +++ b/doc/src/sgml/ref/security_label.sgml @@ -35,7 +35,6 @@ SECURITY LABEL [ FOR provider ] ON MATERIALIZED VIEW object_name | [ PROCEDURAL ] LANGUAGE object_name | PROCEDURE procedure_name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ] | - PROPERTY GRAPH object_name PUBLICATION object_name | ROLE object_name | ROUTINE routine_name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ] | diff --git a/src/bin/psql/tab-complete.in.c b/src/bin/psql/tab-complete.in.c index e4bc2c93145..49ea584cd4f 100644 --- a/src/bin/psql/tab-complete.in.c +++ b/src/bin/psql/tab-complete.in.c @@ -5256,10 +5256,8 @@ match_previous_words(int pattern_id, COMPLETE_WITH("TABLE", "COLUMN", "AGGREGATE", "DATABASE", "DOMAIN", "EVENT TRIGGER", "FOREIGN TABLE", "FUNCTION", "LARGE OBJECT", "MATERIALIZED VIEW", "LANGUAGE", - "PROPERTY GRAPH", "PUBLICATION", "PROCEDURE", "ROLE", "ROUTINE", "SCHEMA", + "PUBLICATION", "PROCEDURE", "ROLE", "ROUTINE", "SCHEMA", "SEQUENCE", "SUBSCRIPTION", "TABLESPACE", "TYPE", "VIEW"); - else if (Matches("SECURITY", "LABEL", "ON", "PROPERTY", "GRAPH")) - COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_propgraphs); else if (Matches("SECURITY", "LABEL", "ON", MatchAny, MatchAny)) COMPLETE_WITH("IS");