From f16f89a616da9d4045e7bea7cc3fd057b83d30fd Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Mon, 2 Apr 2007 22:20:53 +0000 Subject: [PATCH] Allow NOTIFY/LISTEN/UNLISTEN to only take relation names, not schema.relation, because the notify code only honors the relation name. schema.relation will now generate a syntax error. --- src/backend/parser/gram.y | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index 767129fb92..d38393f986 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.585 2007/04/02 03:49:38 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.586 2007/04/02 22:20:53 momjian Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -4834,27 +4834,33 @@ DropRuleStmt: * *****************************************************************************/ -NotifyStmt: NOTIFY qualified_name +NotifyStmt: NOTIFY ColId { NotifyStmt *n = makeNode(NotifyStmt); - n->relation = $2; + n->relation = makeNode(RangeVar); + n->relation->relname = $2; + n->relation->schemaname = NULL; $$ = (Node *)n; } ; -ListenStmt: LISTEN qualified_name +ListenStmt: LISTEN ColId { ListenStmt *n = makeNode(ListenStmt); - n->relation = $2; + n->relation = makeNode(RangeVar); + n->relation->relname = $2; + n->relation->schemaname = NULL; $$ = (Node *)n; } ; UnlistenStmt: - UNLISTEN qualified_name + UNLISTEN ColId { UnlistenStmt *n = makeNode(UnlistenStmt); - n->relation = $2; + n->relation = makeNode(RangeVar); + n->relation->relname = $2; + n->relation->schemaname = NULL; $$ = (Node *)n; } | UNLISTEN '*' -- 2.40.0