]> granicus.if.org Git - postgresql/commitdiff
Reset current user id to session user id during transaction abort
authorPeter Eisentraut <peter_e@gmx.net>
Wed, 27 Sep 2000 10:41:55 +0000 (10:41 +0000)
committerPeter Eisentraut <peter_e@gmx.net>
Wed, 27 Sep 2000 10:41:55 +0000 (10:41 +0000)
src/backend/access/transam/xact.c

index 812e137071cfb134f42e5b06ac4b86bc017c1407..9a52b2ff09cda048e89b2602f0b1b2055e4661dc 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.70 2000/08/06 04:17:47 tgl Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.71 2000/09/27 10:41:55 petere Exp $
  *
  * NOTES
  *             Transaction aborts can now occur two ways:
 #include "commands/trigger.h"
 #include "executor/spi.h"
 #include "libpq/be-fsstubs.h"
+#include "miscadmin.h"
 #include "storage/proc.h"
 #include "storage/sinval.h"
 #include "utils/inval.h"
@@ -1088,6 +1089,11 @@ AbortTransaction()
        if (s->state != TRANS_INPROGRESS)
                elog(NOTICE, "AbortTransaction and not in in-progress state");
 
+       /*
+        * Reset user id which might have been changed transiently
+        */
+       SetUserId(GetSessionUserId());
+
        /* ----------------
         *      Tell the trigger manager that this transaction is about to be
         *      aborted.