Re: SQLExecDirectW returns SQL_SUCCESS even if sql finishes with error

From: Clemens Ladisch <clemens(at)ladisch(dot)de>
To: pgsql-odbc(at)lists(dot)postgresql(dot)org
Subject: Re: SQLExecDirectW returns SQL_SUCCESS even if sql finishes with error
Date: 2018-11-01 09:01:20
Message-ID: e8a014cd-38d1-13f8-21f0-325fa5f3ab9e@ladisch.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Takahashi, Ryohei wrote:
> Anyway, I think it is a problem that SQLExecDirectW() returns SQL_SUCCESS even if sql finishes with error.

When client_min_messages set that high, the server never reports the
error. So the ODBC driver cannot do much about it; at best, it could
report something like "I do not know the status", but that is not
actually possible in the ODBC API.

> He wanted to reduce server logs later and set ... client_min_messages = fatal.

Setting "client_min_messages = fatal" literally means "I do not want to
know about normal errors."

This is an error in the documentation.
I've submitted a bug report: <https://www.postgresql.org/message-id/flat/15479-ef0f4cc2fd995ca2%40postgresql.org>

Regards,
Clemens

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Inoue, Hiroshi 2018-11-01 23:49:38 Re: Problem compiling in mac os with unix odbc
Previous Message Takahashi, Ryohei 2018-11-01 06:57:42 RE: SQLExecDirectW returns SQL_SUCCESS even if sql finishes with error