Re: serializable read only deferrable - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: serializable read only deferrable
Date
Msg-id 4CFF9256020000250003848C@gw.wicourts.gov
Whole thread Raw
In response to Re: serializable read only deferrable  (Florian Pflug <fgp@phlo.org>)
Responses Re: serializable read only deferrable  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Florian Pflug <fgp@phlo.org> wrote:
> Hm, I think being able to assert that the isolation level really
> is SERIALIZABLE by simply doing "SET TRANSACTION ISOLATION LEVEL
> SERIALIZABLE" would be a great feature for SSI.
> 
> Say you've written a trigger which enforces some complex
> constraint, but is correct only for SERIALIZABLE transactions. By
> simply sticking a "SET TRANSACTION ISOLATION LEVEL SERIALIZABLE"
> at the top of the trigger you'd both document that fact it is
> correct only for SERIALIZABLE transactions *and* prevent
> corruption should the isolation level be something else due to 
> a pilot error. Nice, simply and quite effective.
It would be great to have a way within a trigger, or possibly other
functions, to assert that the transaction isolation level is
serializable.  What gives me pause here is that the standard allows
you to specify a more strict transaction isolation level within a
subtransaction without error, so this way of spelling the feature is
flirting with rather nonstandard behavior.
Is there maybe a better way to check this?
-Kevin


pgsql-hackers by date:

Previous
From: Jan Urbański
Date:
Subject: Re: Solving sudoku using SQL
Next
From: Kineticode Billing
Date:
Subject: Re: unlogged tables