Re: Bytea and perl - Mailing list pgsql-novice

From John DeSoi
Subject Re: Bytea and perl
Date
Msg-id E86E41F8-8473-4FEE-8C22-6934B78B3E4F@pgedit.com
Whole thread Raw
In response to Re: Bytea and perl  ("Greg Sabino Mullane" <greg@turnstep.com>)
Responses Re: Bytea and perl
List pgsql-novice
On Mar 23, 2006, at 9:50 PM, Greg Sabino Mullane wrote:

>> OK.  Here is my follow-up question.  Why is this explicit
>> parameter binding
>> necessary?  When would I want to have pg_type be something other than
>> PG_BYTEA when inserting into a bytea column?
>
> You wouldn't, but the trick is getting all the pieces to know that
> the column
> is bytea. DBD::Pg has no inherent way to find out for iteslf. Nor
> does libpq.
> The planner has an idea, but that information is not transmitted
> back to DBD:Pg.


I have not looked at libpq in any detail, but it should have access
to the type of all the parameters in the prepared statement. The
Describe (F) statement in the frontend/backend protocol identifies
the type of each parameter. I'm using this in Lisp to convert
parameters as needed for prepared statements.

http://www.postgresql.org/docs/8.1/static/protocol-message-formats.html



John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


pgsql-novice by date:

Previous
From: Alan Hodgson
Date:
Subject: Re: Indexes and inheritance
Next
From: Bruno Wolff III
Date:
Subject: Re: help with a view (join-query)