Explorar el Código

* Patch from Martin Schreiber to fix AV when using postgres 7.x

git-svn-id: trunk@10345 -
joost hace 17 años
padre
commit
0fcaf1f671
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      packages/fcl-db/src/sqldb/postgres/pqconnection.pp

+ 2 - 1
packages/fcl-db/src/sqldb/postgres/pqconnection.pp

@@ -364,7 +364,8 @@ begin
     DatabaseError(sErrConnectionFailed + ' (PostgreSQL: ' + msg + ')',self);
     end;
 // This does only work for pg>=8.0, so timestamps won't work with earlier versions of pg which are compiled with integer_datetimes on
-  FIntegerDatetimes := pqparameterstatus(FSQLDatabaseHandle,'integer_datetimes') = 'on';
+  if PQparameterStatus<>nil then
+    FIntegerDatetimes := pqparameterstatus(FSQLDatabaseHandle,'integer_datetimes') = 'on';
 end;
 
 procedure TPQConnection.DoInternalDisconnect;