Skip to content

Commit f16f89a

Browse files
committed
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.
1 parent 325feae commit f16f89a

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

src/backend/parser/gram.y

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.585 2007/04/02 03:49:38 tgl Exp $
14+
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.586 2007/04/02 22:20:53 momjian Exp $
1515
*
1616
* HISTORY
1717
* AUTHOR DATE MAJOR EVENT
@@ -4834,27 +4834,33 @@ DropRuleStmt:
48344834
*
48354835
*****************************************************************************/
48364836

4837-
NotifyStmt: NOTIFY qualified_name
4837+
NotifyStmt: NOTIFY ColId
48384838
{
48394839
NotifyStmt *n = makeNode(NotifyStmt);
4840-
n->relation = $2;
4840+
n->relation = makeNode(RangeVar);
4841+
n->relation->relname = $2;
4842+
n->relation->schemaname = NULL;
48414843
$$ = (Node *)n;
48424844
}
48434845
;
48444846

4845-
ListenStmt: LISTEN qualified_name
4847+
ListenStmt: LISTEN ColId
48464848
{
48474849
ListenStmt *n = makeNode(ListenStmt);
4848-
n->relation = $2;
4850+
n->relation = makeNode(RangeVar);
4851+
n->relation->relname = $2;
4852+
n->relation->schemaname = NULL;
48494853
$$ = (Node *)n;
48504854
}
48514855
;
48524856

48534857
UnlistenStmt:
4854-
UNLISTEN qualified_name
4858+
UNLISTEN ColId
48554859
{
48564860
UnlistenStmt *n = makeNode(UnlistenStmt);
4857-
n->relation = $2;
4861+
n->relation = makeNode(RangeVar);
4862+
n->relation->relname = $2;
4863+
n->relation->schemaname = NULL;
48584864
$$ = (Node *)n;
48594865
}
48604866
| UNLISTEN '*'

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy