Re: pg_[un]escape_bytea, pgsql 8.2.1, php 5.1.6, Linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



gwchamb@xxxxxxxxx wrote:
> Vincent...
>
>> This would be a problem related to php, not postgres. I'm handling binary data
>> in parameterized and COPY queries just fine with c++.
>
> I'm not ruling-out PHP, but I've seen claims of pg_[un]escape_bytea
> being only wrappers to the Pg functions.

That is correct, the PHP function relies on the PostgreSQL library to do
the work. But the problem of using a parameterized query with bytea data
is specific to PHP. PostgreSQL allows you to either escape the bytea
data for use as a text-mode parameter, or pass it 'raw' as a binary-mode
parameter. I don't know a good way to do the first in PHP, and the PHP
PostgreSQL interface doesn't support the second at all.


[Index of Archives]     [Postgresql General]     [Postgresql Admin]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Backpacking]     [Postgresql Jobs]

  Powered by Linux