On 26/06/2013 00:44, Yasuo Ohgaki wrote:
> New:
> resource pg_execute ([ resource $connection ], string $stmtname , array
> $params [, array $params_format [, bool $binary_result]] )
> 
> Any thoughts?

Using binary format "requires knowledge of the internal representation
expected by the backend. For example, integers must be passed in network
byte order", quoting the libpq documentation.

Although it is possible to specify whether or not each parameter is
binary, the same is not possible for the result due to a limitation in
libpq. Meaning that $binary_result can only be used for queries
returning one or more bytea fields.

I would be happier if we could make this transparent to the user, but I
don't see any feasible way to do this, at least for the results.

I have mixed feelings... I see where this might come in handy, but I
think it would be a bit too user-unfriendly.

PDO_pgsql on the other hand, when used with explicit parameter binding,
could automatically use binary format for LOB fields.


Cheers
-- 
Matteo Beccati

Development & Consulting - http://www.beccati.com/

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to