pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedStatement level transactions
3+ messages / 3 participants
[nested] [flat]
* Statement level transactions
@ 2005-02-25 13:27 Kovács Péter <peter.kovacs@chemaxon.hu>
2005-02-25 19:11 ` Re: Statement level transactions Kris Jurka <books@ejurka.com>
2005-02-25 21:03 ` Re: Statement level transactions Markus Schaber <schabios@logi-track.com>
0 siblings, 2 replies; 3+ messages in thread
From: Kovács Péter @ 2005-02-25 13:27 UTC (permalink / raw)
To: pgsql-jdbc
Hi,
With the introduction of checkpoints, it is now possible (or has been
made very easy) to implement behaviour what Oracle calls "statement
level transaction". E.g:
Inserting an already existing value into a column with unique key
constraint throws an exception, but the containing transaction can
continue. I can mimique this behaviour by using checkpoints.
Is there any facility in place (in the JDBC driver or in the backend)
that already does this for me? I.e. is there a config parameter that I
have just to turn on to have statement level transaction behaviour?
I also remember having read in the new features list for 8.0 the
introduction of nested transaction. I found no mention to nested
transactions in the user guides though. Am I missing something?
Thank you!
Regards,
Peter
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Statement level transactions
2005-02-25 13:27 Statement level transactions Kovács Péter <peter.kovacs@chemaxon.hu>
@ 2005-02-25 19:11 ` Kris Jurka <books@ejurka.com>
1 sibling, 0 replies; 3+ messages in thread
From: Kris Jurka @ 2005-02-25 19:11 UTC (permalink / raw)
To: Kovács Péter <peter.kovacs@chemaxon.hu>; +Cc: pgsql-jdbc
On Fri, 25 Feb 2005, [ISO-8859-1] Kovács Péter wrote:
> With the introduction of checkpoints, it is now possible (or has been
> made very easy) to implement behaviour what Oracle calls "statement
> level transaction". E.g:
>
> Inserting an already existing value into a column with unique key
> constraint throws an exception, but the containing transaction can
> continue. I can mimique this behaviour by using checkpoints.
>
> Is there any facility in place (in the JDBC driver or in the backend)
> that already does this for me? I.e. is there a config parameter that I
> have just to turn on to have statement level transaction behaviour?
>
> I also remember having read in the new features list for 8.0 the
> introduction of nested transaction. I found no mention to nested
> transactions in the user guides though. Am I missing something?
>
8.0 has implemented savepoints, which I think you are calling checkpoints.
The driver has no provision for automatically setting and rolling back to
savepoints. There was some discussion on this list about doing that, and
it was generally agreed it would be a nice compatibility feature for other
databases, but no one has stepped up to do that yet. For now you can
manually set and release Savepoints with the standard JDBC interface.
Kris Jurka
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Statement level transactions
2005-02-25 13:27 Statement level transactions Kovács Péter <peter.kovacs@chemaxon.hu>
@ 2005-02-25 21:03 ` Markus Schaber <schabios@logi-track.com>
1 sibling, 0 replies; 3+ messages in thread
From: Markus Schaber @ 2005-02-25 21:03 UTC (permalink / raw)
To: Kovács Péter <peter.kovacs@chemaxon.hu>; +Cc: pgsql-jdbc
Hi, Peter,
Kovács Péter schrieb:
> I also remember having read in the new features list for 8.0 the
> introduction of nested transaction. I found no mention to nested
> transactions in the user guides though. Am I missing something?
Savepoints can be used to create nested transactions. For every inner
transaction you want to start, create a savepoint. If you want to commit
or abort that transaction, you release or rollback that savepoint.
Actually, savepoints allow more flexible usage patterns compared to
nested transactions.
HTH,
Markus
--
markus schaber | dipl. informatiker
logi-track ag | rennweg 14-16 | ch 8001 zürich
phone +41-43-888 62 52 | fax +41-43-888 62 53
mailto:schabios@logi-track.com | www.logi-track.com
Attachments:
signature.asc (application/pgp-signature, 255B) download
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2005-02-25 21:03 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-02-25 13:27 Statement level transactions Kovács Péter <peter.kovacs@chemaxon.hu>
2005-02-25 19:11 ` Kris Jurka <books@ejurka.com>
2005-02-25 21:03 ` Markus Schaber <schabios@logi-track.com>
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