Re: SQL_QUERY_TIMEOUT

From: "Inoue, Hiroshi" <h-inoue(at)dream(dot)email(dot)ne(dot)jp>
To: Ondrej Dzivy Balucha <balucha(at)horizon(dot)sk>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: SQL_QUERY_TIMEOUT
Date: 2017-05-09 11:25:40
Message-ID: c7fdeea1-b6dd-c285-3d1f-f86e6d271aa9@dream.email.ne.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hi Ondrej,

On 2017/05/09 18:13, Ondrej Dzivy Balucha wrote:
> Hi,
>
> This is only way to use SQL_QUERY_TIMEOUT?

In 9.06.0300, you can set ConnSettings(commands sent to backend on
connection)
in odbc.ini like

ConnSettings = set statement_timeout=30

regards,
Hiroshi Inoue

>
> Can I setup this in odbc.ini like global parameter for all my
> connections (applications)?
> It can be useful to independently check/break (outside application -
> when using third-party applications ) dead connection or unexpected
> long running query or other communication error.
>
> Other databases(ODBC clients) has parameter to set up this in config
> file.
> For example DB2 ODBC client has parameter ReceiveTimeout where I can
> setup how many second client wait for response from server. After this
> timeout client return communication error. This is great parameter for
> situation when I use third-party applications, for example.
>
> Regards
>
> Ondrej Dzivy Balucha
> Horizon, s.r.o. Prešov
> Francisciho 21
> 08001 Prešov
> tel/fax +421517491400/02
>
> On 06.05.2017 04:59, Inoue, Hiroshi wrote:
>> Hi Ondrej,
>>
>> On 2017/05/05 22:09, Ondrej Dzivy Balucha wrote:
>>> Hi,
>>>
>>> I found that in psqlODBC 09.05.0300 Release was implemented
>>> SQL_QUERY_TIMEOUT.
>>> How it works?
>>
>> Please call ODBC API like
>>
>> SQLSetStmtAttr(hstmt, SQL_ATTR_QUERY_TIMEOUT, (void *) timeout, 0);
>>
>> regards,
>> Hiroshi Inoue
>>
>>> I need to set up odbc connection in Debian, that send me
>>> error(disconnet dead connection) after defined time, but I can`t find
>>> how can I setup SQL_QUERY_TIMEOUT in odbc.ini.
>>> I have installed latest odbc driver(09.06.0200)
>>>
>>> Regards

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Robert Ball 2017-05-09 12:22:19 Issue with psqlodbc and MSACCESS
Previous Message Ondrej Dzivy Balucha 2017-05-09 09:13:27 Re: SQL_QUERY_TIMEOUT