]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Don't convert fformat and binary_tuples to Format in C pq wrapper
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 30 Dec 2020 17:53:19 +0000 (18:53 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 8 Jan 2021 01:26:53 +0000 (02:26 +0100)
psycopg3_c/psycopg3_c/pq/pgresult.pyx

index e4ed5ada1ca5a2c9d985905d25ae50b81277175e..4f6479a9e63e56f34429350c6f7c74027ef2172f 100644 (file)
@@ -70,8 +70,8 @@ cdef class PGresult:
     def ftablecol(self, int column_number) -> int:
         return libpq.PQftablecol(self.pgresult_ptr, column_number)
 
-    def fformat(self, int column_number) -> Format:
-        return Format(libpq.PQfformat(self.pgresult_ptr, column_number))
+    def fformat(self, int column_number) -> int:
+        return libpq.PQfformat(self.pgresult_ptr, column_number)
 
     def ftype(self, int column_number) -> int:
         return libpq.PQftype(self.pgresult_ptr, column_number)
@@ -83,8 +83,8 @@ cdef class PGresult:
         return libpq.PQfsize(self.pgresult_ptr, column_number)
 
     @property
-    def binary_tuples(self) -> Format:
-        return Format(libpq.PQbinaryTuples(self.pgresult_ptr))
+    def binary_tuples(self) -> int:
+        return libpq.PQbinaryTuples(self.pgresult_ptr)
 
     def get_value(self, int row_number, int column_number) -> Optional[bytes]:
         cdef int crow = row_number