Commit f16f89a6 authored by Bruce Momjian's avatar Bruce Momjian

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.
parent 325feaef
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* *
* *
* IDENTIFICATION * 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 * HISTORY
* AUTHOR DATE MAJOR EVENT * AUTHOR DATE MAJOR EVENT
...@@ -4834,27 +4834,33 @@ DropRuleStmt: ...@@ -4834,27 +4834,33 @@ DropRuleStmt:
* *
*****************************************************************************/ *****************************************************************************/
NotifyStmt: NOTIFY qualified_name NotifyStmt: NOTIFY ColId
{ {
NotifyStmt *n = makeNode(NotifyStmt); NotifyStmt *n = makeNode(NotifyStmt);
n->relation = $2; n->relation = makeNode(RangeVar);
n->relation->relname = $2;
n->relation->schemaname = NULL;
$$ = (Node *)n; $$ = (Node *)n;
} }
; ;
ListenStmt: LISTEN qualified_name ListenStmt: LISTEN ColId
{ {
ListenStmt *n = makeNode(ListenStmt); ListenStmt *n = makeNode(ListenStmt);
n->relation = $2; n->relation = makeNode(RangeVar);
n->relation->relname = $2;
n->relation->schemaname = NULL;
$$ = (Node *)n; $$ = (Node *)n;
} }
; ;
UnlistenStmt: UnlistenStmt:
UNLISTEN qualified_name UNLISTEN ColId
{ {
UnlistenStmt *n = makeNode(UnlistenStmt); UnlistenStmt *n = makeNode(UnlistenStmt);
n->relation = $2; n->relation = makeNode(RangeVar);
n->relation->relname = $2;
n->relation->schemaname = NULL;
$$ = (Node *)n; $$ = (Node *)n;
} }
| UNLISTEN '*' | UNLISTEN '*'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment