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

From: ljb <lbayuk(at)pobox(dot)com>
To: pgsql-php(at)postgresql(dot)org
Subject: Re: pg_[un]escape_bytea, pgsql 8.2.1, php 5.1.6, Linux
Date: 2007-02-08 02:08:41
Message-ID: eqe0n8$1ohp$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

gwchamb(at)gmail(dot)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.

In response to

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Vincent de Phily 2007-02-08 12:12:43 Re: pg_[un]escape_bytea, pgsql 8.2.1, php 5.1.6, Linux
Previous Message Gary Chambers 2007-02-07 14:58:34 Re: pg_[un]escape_bytea, pgsql 8.2.1, php 5.1.6, Linux