浏览代码

+ Fix bug #4376, varchar without size specification

git-svn-id: trunk@1389 -
joost 20 年之前
父节点
当前提交
21dde458f5
共有 1 个文件被更改,包括 3 次插入0 次删除
  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);