pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedForce explicit transactions on insert / update
2+ messages / 2 participants
[nested] [flat]
* Force explicit transactions on insert / update
@ 2012-01-21 06:33 Jesper Krogh <jesper@krogh.cc>
2012-01-22 17:51 ` Re: Force explicit transactions on insert / update Kevin Grittner <Kevin.Grittner@wicourts.gov>
0 siblings, 1 reply; 2+ messages in thread
From: Jesper Krogh @ 2012-01-21 06:33 UTC (permalink / raw)
To: pgsql-admin
Hi.
Is there any way I can force explicit use of transactions on
insert/updates?
I do have users sitting on the system, that may forget to code it that
way and it would be nice to be able to force the database to just kick
them out if it didn't happen.
--
Jesper
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Force explicit transactions on insert / update
2012-01-21 06:33 Force explicit transactions on insert / update Jesper Krogh <jesper@krogh.cc>
@ 2012-01-22 17:51 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Grittner @ 2012-01-22 17:51 UTC (permalink / raw)
To: Jesper Krogh <jesper@krogh.cc>; pgsql-admin
Jesper Krogh <jesper@krogh.cc> wrote:
> Is there any way I can force explicit use of transactions on
> insert/updates?
>
> I do have users sitting on the system, that may forget to code it
> that way and it would be nice to be able to force the database to
> just kick them out if it didn't happen.
Not that I can think of, unless you pass the queries through some
proxy which enforces the rule. Generally, a statement outside of an
explicit transaction block starts its own transaction for just that
statement, just as if the statement were wrapped in BEGIN/COMMIT.
You could maybe get glimpses of such statements by periodically
looking at pg_stat_activity for statements which have the same
timestamp for xact_start and query_start.
-Kevin
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2012-01-22 17:51 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-01-21 06:33 Force explicit transactions on insert / update Jesper Krogh <jesper@krogh.cc>
2012-01-22 17:51 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox