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.
This commit is contained in:
parent
325feaef7f
commit
f16f89a616
@ -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 '*'
|
||||
|
Loading…
x
Reference in New Issue
Block a user