sad wrote:
On Wednesday 01 December 2004 18:42, Tom Lane wrote:

Christoph Haller <[EMAIL PROTECTED]> writes:

Please, could someone point me to the right list
or tell me how to do a "SET AUTOCOMMIT TO OFF" within libpq.

libpq does not have any support for that.


Does this mean libpq calls always uncommited or commited ?

1. Connect 2. Issue "INSERT ..." The insert will be committed.

1. Connect
2. Issue "INSERT...; UPDATE...; INSERT...;" in one PQexec
All 3 will be committed in one transaction

1. Connect
2. Issue "BEGIN"
3. Issue "INSERT..."
4. Issue "UPDATE..."
5. Issue "INSERT..."
6. etc
Until you issue COMMIT/ROLLBACK the transaction remains open.
If you had an error at step 3, then 4,5 would fail because the transaction would be aborted (but waiting for you to issue ROLLBACK).


I think that covers all the combinations.
--
  Richard Huxton
  Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
   (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to