Ver código fonte

+ Fix bug #4376, varchar without size specification

git-svn-id: trunk@1389 -
joost 20 anos atrás
pai
commit
21dde458f5
1 arquivos alterados com 3 adições e 0 exclusões
  1. 3 0
      fcl/db/sqldb/postgres/pqconnection.pp

+ 3 - 0
fcl/db/sqldb/postgres/pqconnection.pp

@@ -539,7 +539,10 @@ begin
       fieldtype := TranslateFldType(PQftype(BaseRes, i));
 
       if (fieldtype = ftstring) and (size = -1) then
+        begin
         size := pqfmod(baseres,i)-3;
+        if size = -4 then size := dsMaxStringSize;
+        end;
       if fieldtype = ftdate  then
         size := sizeof(double);