Hello,

The following patch fixes the reading of a bytea field from a PgSQL database.

Btw is there someone working on pg's blob storage?

Joao Morais
Index: packages/fcl-db/src/sqldb/postgres/pqconnection.pp
===================================================================
--- packages/fcl-db/src/sqldb/postgres/pqconnection.pp  (revision 11085)
+++ packages/fcl-db/src/sqldb/postgres/pqconnection.pp  (working copy)
@@ -103,6 +103,7 @@
   SErrPrepareFailed = 'Preparation of query failed.';
 
 const Oid_Bool     = 16;
+      Oid_Bytea    = 17;
       Oid_Text     = 25;
       Oid_Oid      = 26;
       Oid_Name     = 19;
@@ -395,6 +396,7 @@
                              end;
 //    Oid_text               : Result := ftstring;
     Oid_text               : Result := ftBlob;
+    Oid_Bytea              : Result := ftBlob;
     Oid_oid                : Result := ftInteger;
     Oid_int8               : Result := ftLargeInt;
     Oid_int4               : Result := ftInteger;
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to