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

From ljb
Subject Re: pg_[un]escape_bytea, pgsql 8.2.1, php 5.1.6, Linux
Date
Msg-id eqe0n8$1ohp$1@news.hub.org
Whole thread Raw
In response to pg_[un]escape_bytea, pgsql 8.2.1, php 5.1.6, Linux  ("Gary Chambers" <gwchamb@gmail.com>)
Responses Re: pg_[un]escape_bytea, pgsql 8.2.1, php 5.1.6, Linux
List pgsql-php
gwchamb@gmail.com 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.

pgsql-php by date:

Previous
From: "Gary Chambers"
Date:
Subject: Re: pg_[un]escape_bytea, pgsql 8.2.1, php 5.1.6, Linux
Next
From: Vincent de Phily
Date:
Subject: Re: pg_[un]escape_bytea, pgsql 8.2.1, php 5.1.6, Linux