Skip to content

Commit

Permalink
PostgreSQL: query timeout is set in milliseconds, not seconds. See ht…
Browse files Browse the repository at this point in the history
  • Loading branch information
ansgarbecker committed Nov 21, 2016
1 parent ce444cb commit 34e8068
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/dbconnection.pas
Expand Up @@ -1963,7 +1963,7 @@ procedure TPgConnection.SetActive(Value: Boolean);
FConnectionStarted := GetTickCount div 1000;
Log(lcInfo, f_('Connected. Thread-ID: %d', [ThreadId]));
FIsUnicode := True;
Query('SET statement_timeout TO '+IntToStr(Parameters.QueryTimeout));
Query('SET statement_timeout TO '+IntToStr(Parameters.QueryTimeout*1000));
try
FServerUptime := StrToIntDef(GetVar('SELECT EXTRACT(EPOCH FROM CURRENT_TIMESTAMP - pg_postmaster_start_time())::INTEGER'), -1);
except
Expand Down

0 comments on commit 34e8068

Please sign in to comment.