Skip to content
Browse files
PostgreSQL: query timeout is set in milliseconds, not seconds. See ht…
  • Loading branch information
ansgarbecker committed Nov 21, 2016
1 parent ce444cb commit 34e8068
Showing 1 changed file with 1 addition and 1 deletion.
@@ -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));
FServerUptime := StrToIntDef(GetVar('SELECT EXTRACT(EPOCH FROM CURRENT_TIMESTAMP - pg_postmaster_start_time())::INTEGER'), -1);

0 comments on commit 34e8068

Please sign in to comment.