Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf16f89a

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 parent325feae commitf16f89a

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/0203:49:38 tgl Exp $
14+
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.586 2007/04/0222:20:53 momjian Exp $
1515
*
1616
* HISTORY
1717
* AUTHORDATEMAJOR EVENT
@@ -4834,27 +4834,33 @@ DropRuleStmt:
48344834
*
48354835
*****************************************************************************/
48364836

4837-
NotifyStmt: NOTIFYqualified_name
4837+
NotifyStmt: NOTIFYColId
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: LISTENqualified_name
4847+
ListenStmt: LISTENColId
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-
UNLISTENqualified_name
4858+
UNLISTENColId
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)

[8]ページ先頭

©2009-2025 Movatter.jp