Skip to content

Commit 34e8068

Browse files
committed
PostgreSQL: query timeout is set in milliseconds, not seconds. See http://www.heidisql.com/forum.php?t=22645
1 parent ce444cb commit 34e8068

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/dbconnection.pas

+1-1
Original file line numberDiff line numberDiff line change
@@ -1963,7 +1963,7 @@ procedure TPgConnection.SetActive(Value: Boolean);
19631963
FConnectionStarted := GetTickCount div 1000;
19641964
Log(lcInfo, f_('Connected. Thread-ID: %d', [ThreadId]));
19651965
FIsUnicode := True;
1966-
Query('SET statement_timeout TO '+IntToStr(Parameters.QueryTimeout));
1966+
Query('SET statement_timeout TO '+IntToStr(Parameters.QueryTimeout*1000));
19671967
try
19681968
FServerUptime := StrToIntDef(GetVar('SELECT EXTRACT(EPOCH FROM CURRENT_TIMESTAMP - pg_postmaster_start_time())::INTEGER'), -1);
19691969
except

0 commit comments

Comments
 (0)