Reset current user id to session user id during transaction abort
This commit is contained in:
parent
76f286b2ce
commit
64610a82f2
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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
|
* NOTES
|
||||||
* Transaction aborts can now occur two ways:
|
* Transaction aborts can now occur two ways:
|
||||||
@ -162,6 +162,7 @@
|
|||||||
#include "commands/trigger.h"
|
#include "commands/trigger.h"
|
||||||
#include "executor/spi.h"
|
#include "executor/spi.h"
|
||||||
#include "libpq/be-fsstubs.h"
|
#include "libpq/be-fsstubs.h"
|
||||||
|
#include "miscadmin.h"
|
||||||
#include "storage/proc.h"
|
#include "storage/proc.h"
|
||||||
#include "storage/sinval.h"
|
#include "storage/sinval.h"
|
||||||
#include "utils/inval.h"
|
#include "utils/inval.h"
|
||||||
@ -1088,6 +1089,11 @@ AbortTransaction()
|
|||||||
if (s->state != TRANS_INPROGRESS)
|
if (s->state != TRANS_INPROGRESS)
|
||||||
elog(NOTICE, "AbortTransaction and not in in-progress state");
|
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
|
* Tell the trigger manager that this transaction is about to be
|
||||||
* aborted.
|
* aborted.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user