Skip to content
Snippets Groups Projects
Commit 9981b0f9 authored by Jan Wieck's avatar Jan Wieck
Browse files

Fire rule actions ON INSERT after original statement (if not INSTEAD).

Jan
parent 852a26f7
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.95 2001/06/13 18:56:30 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.96 2001/07/06 13:40:47 wieck Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -860,7 +860,10 @@ deepRewriteQuery(Query *parsetree) ...@@ -860,7 +860,10 @@ deepRewriteQuery(Query *parsetree)
* the rule actions cannot find them. * the rule actions cannot find them.
*/ */
if (!instead) if (!instead)
rewritten = lappend(rewritten, parsetree); if (parsetree->commandType == CMD_INSERT)
rewritten = lcons(parsetree, rewritten);
else
rewritten = lappend(rewritten, parsetree);
return rewritten; return rewritten;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment