summaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xact.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/transam/xact.c')
-rw-r--r--src/backend/access/transam/xact.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 36bfc3f5426..90c94fa511a 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.156.2.5 2008/01/03 21:25:33 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.156.2.6 2009/12/09 21:59:06 tgl Exp $
*
* NOTES
* Transaction aborts can now occur two ways:
@@ -851,7 +851,7 @@ static void
StartTransaction(void)
{
TransactionState s = CurrentTransactionState;
- bool prevSecDefCxt;
+ int prevSecContext;
/*
* check the current transaction state
@@ -885,9 +885,9 @@ StartTransaction(void)
s->commandId = FirstCommandId;
s->startTime = GetCurrentAbsoluteTimeUsec(&(s->startTimeUsec));
- GetUserIdAndContext(&prevUser, &prevSecDefCxt);
- /* SecurityDefinerContext should never be set outside a transaction */
- Assert(!prevSecDefCxt);
+ GetUserIdAndSecContext(&prevUser, &prevSecContext);
+ /* SecurityRestrictionContext should never be set outside a transaction */
+ Assert(prevSecContext == 0);
/*
* initialize the various transaction subsystems
@@ -1084,13 +1084,13 @@ AbortTransaction(void)
* Reset user ID which might have been changed transiently. We need this
* to clean up in case control escaped out of a SECURITY DEFINER function
* or other local change of CurrentUserId; therefore, the prior value
- * of SecurityDefinerContext also needs to be restored.
+ * of SecurityRestrictionContext also needs to be restored.
*
* (Note: it is not necessary to restore session authorization
* setting here because that can only be changed via GUC, and GUC will
* take care of rolling it back if need be.)
*/
- SetUserIdAndContext(prevUser, false);
+ SetUserIdAndSecContext(prevUser, 0);
/*
* do abort processing