pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: ljb <lbayuk@pobox.com>
To: pgsql-php@postgresql.org
Subject: Re: pg_[un]escape_bytea, pgsql 8.2.1, php 5.1.6, Linux
Date: Thu, 8 Feb 2007 02:08:41 +0000 (UTC)
Message-ID: <eqe0n8$1ohp$1@news.hub.org> (raw)
References: <302670f20702011827x28d9a689m388b2c8a703f31af@mail.gmail.com>
	<eq0ta7$15us$1@news.hub.org>
	<302670f20702022009x417a210fm5e0fa36d860a225@mail.gmail.com>
	<200702051101.40315.vdephily@bluemetrix.com>
	<302670f20702070658vb0913e2xa51d153ddbe5b34d@mail.gmail.com>

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.



view thread (10+ messages)  latest in thread

Message-ID: <eqe0n8$1ohp$1@news.hub.org>
Permalink:  ../eqe0n8$1ohp$1@news.hub.org/
Also on:    postgresql.org/message-id/eqe0n8$1ohp$1@news.hub.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: lbayuk@pobox.com
  Subject: Re: pg_[un]escape_bytea, pgsql 8.2.1, php 5.1.6, Linux
  In-Reply-To: <eqe0n8$1ohp$1@news.hub.org>
  References: <302670f20702011827x28d9a689m388b2c8a703f31af@mail.gmail.com> <eq0ta7$15us$1@news.hub.org> <302670f20702022009x417a210fm5e0fa36d860a225@mail.gmail.com> <200702051101.40315.vdephily@bluemetrix.com> <302670f20702070658vb0913e2xa51d153ddbe5b34d@mail.gmail.com> <eqe0n8$1ohp$1@news.hub.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox