Re: pgsql/src/backend/utils/adt (ri_triggers.c)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: 520083510237-0001(at)t-online(dot)de (Peter Eisentraut)
Cc: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, Peter Eisentraut - PostgreSQL <petere(at)hub(dot)org>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql/src/backend/utils/adt (ri_triggers.c)
Date: 2000-09-26 14:36:39
Message-ID: 23197.969978999@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

520083510237-0001(at)t-online(dot)de (Peter Eisentraut) writes:
> Tom Lane writes:
>> It'll certainly be necessary for xact abort to restore the original
>> user ID setting. Peter, did you do that already?

> That's done by the setjmp/longjmp, no?

Not automatically, surely. If there is an alterable global variable
containing the effective UID, then you must take care to reset it to
the session value during transaction abort --- ie, somewhere in the
transaction abort processing invoked by AbortTransaction in
backend/access/transam/xact.c. (The same goes for any other
status variable that might be temporarily altered by a transaction,
of course. This is one reason why transient changes in globals are
A Bad Thing to be studiously avoided whenever possible. But sometimes
you gotta have 'em.)

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2000-09-27 10:41:05 Re: pgsql/src/backend/utils/adt (ri_triggers.c)
Previous Message Peter Eisentraut 2000-09-26 12:25:17 Re: pgsql/src/backend/utils/adt (ri_triggers.c)