Postgres has some problems with the unit code. WIthout getting into personal preferences with code indentation (eye rolls) I would like to point out that (at least on windows) reading res after pqclear(res) will result in a SIGFAULT error.<br>
<br>So inspecting pqconnection.Execute(...)<br><br> res := pqexec(tr.PGConn,pchar(s));<br> if (PQresultStatus(res) in [PGRES_COMMAND_OK,PGRES_TUPLES_OK]) then begin<br> pqclear(res);<br> <snip><br> if not (PQresultStatus(res) in [PGRES_COMMAND_OK,PGRES_TUPLES_OK]) then<br>
begin<br> s := PQerrorMessage(tr.PGConn);<br><br>I'm consistently getting a SIGFAULT error unless I set res to nil and change the following <br><br><br> res := pqexec(tr.PGConn,pchar(s));<br>
if (PQresultStatus(res) in [PGRES_COMMAND_OK,PGRES_TUPLES_OK]) then begin<br>
pqclear(res);<br>
res:=nil;<br> <snip><br>
if (res<>nil) and not (PQresultStatus(res) in [PGRES_COMMAND_OK,PGRES_TUPLES_OK]) then<br>
begin<br>
s := PQerrorMessage(tr.PGConn);<br><br>Can someome please review pqconnection.pp and fix this? I'm having to re-apply my fix every time I update and my bug report is going unheeded. Which is crippling my ability to even use Postgres. <br>
<br>Please, fix soon :-) <br>