Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

346
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda