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

Commitb2b5656

Browse files
committed
Don't try to rewrite NEW references in a utility statement in a rule.
There won't be any, and in fact there won't even be an RTE for NEW,which was leading to a core dump in CVS tip. 7.4 and earlier managenot to crash when applying ResolveNew in this scenario, but I thinkit was just good fortune that they didn't. Per report fromBernd Helmle.
1 parent752089e commitb2b5656

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/backend/rewrite/rewriteHandler.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/rewrite/rewriteHandler.c,v 1.140 2004/06/16 01:26:46 tgl Exp $
10+
* $PostgreSQL: pgsql/src/backend/rewrite/rewriteHandler.c,v 1.141 2004/08/07 17:40:49 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -208,7 +208,8 @@ rewriteRuleAction(Query *parsetree,
208208
* apply it to sub_action; we have to remember to update the sublink
209209
* inside rule_action, too.
210210
*/
211-
if (event==CMD_INSERT||event==CMD_UPDATE)
211+
if ((event==CMD_INSERT||event==CMD_UPDATE)&&
212+
sub_action->commandType!=CMD_UTILITY)
212213
{
213214
sub_action= (Query*)ResolveNew((Node*)sub_action,
214215
new_varno,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp