         }
         
         let resultPointer = withUnsafePointers(to: parameterDatas) {
-            PQexecParams(pointer, sql, Int32($0.count), parameterTypes.map { $0 ?? 0 }, $0, parameterLengths, parameterFormats, 0)!
+            PQexecParams(pointer, sql, Int32($0.count), parameterTypes.map { $0 ?? 0 }, $0, parameterLengths, parameterFormats, resultFormat.rawValue)!
         }
         
         return try PostgreSQL.Result(pointer: resultPointer)


extension PostgreSQL.PreparedStatement {
    /// - RecommendedOver: `PQexecPrepared`
    public func execute(with parameterValues: [PostgreSQL.RawValue?]) throws -> PostgreSQL.Result {
        guard let name = name else {
            preconditionFailure("Called execute(with:) on deallocated prepared statement")
        }

        }
        
        let resultPointer = withUnsafePointers(to: parameterDatas) {
            PQexecPrepared(connection.pointer, name, Int32($0.count), $0, parameterLengths, parameterFormats, resultFormat.rawValue)!
        }
        
        return try PostgreSQL.Result(pointer: resultPointer)
