Re: Bytea and perl

From: John DeSoi <desoi(at)pgedit(dot)com>
To: Greg Sabino Mullane <greg(at)turnstep(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Bytea and perl
Date: 2006-03-25 13:47:28
Message-ID: E86E41F8-8473-4FEE-8C22-6934B78B3E4F@pgedit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2006-03-25 14:49:21 Re: [SUGGESTION] CVSync
Previous Message Jim C. Nasby 2006-03-25 13:10:18 Re: [PATCHES] Automatically setting work_mem

Browse pgsql-novice by date

  From Date Subject
Next Message Bruno Wolff III 2006-03-25 23:59:11 Re: help with a view (join-query)
Previous Message Alan Hodgson 2006-03-24 19:26:08 Re: Indexes and inheritance