Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

345
Views
What does Postgresql ODBC AutoCommit mode really mean

Postgresql (via psql) seems to always auto commit after each statement unless a begin has been issued, in which case it commits on a commit/rollback. Fine.

But ODBC has an autocommit flag that says do it or don't. A mode on the transaction. That is a different model to using begins.

So how do they interact? Does ODBC autocommit actually send anything to the server, or does it just issue a hidden begin if set false? Suppose I have autocommit false, and then do

  -- autocommit = false in ODBC driver
  -- no explicit begin
  update 1;
  update 2;
  rollback;
  -- no begin
  update 4;
  update 5;
  rollback;

does update 4 get rolled back? I presume that the others all do get rolled back.

Please, no responses that say auto commit auto commits after every query. This is a (relatively) sophisticated question.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Update 4 will get rolled back.

All clients that support "autocommit = off" implement that by sending an extra BEGIN to the server before the first statement after the end of a transaction. PostgreSQL itself is oblivious to that; it does not have a mode where autocommit is disabled.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!