Browse Source

+ Fix bug #4376, varchar without size specification

git-svn-id: trunk@1389 -
joost 20 years ago
parent
commit
21dde458f5
1 changed files with 3 additions and 0 deletions
  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);