You don't use quote when using placeholders, but you will have to escape 
the special characters, as mentioned previously.

The note in DBD:Pg perldoc that says this:

           NOTE: The undocumented (and invalid) support for the 
"SQL_BINARY"
           data type is officially deprecated. Use "PG_BYTEA" with
           "bind_param()" instead:

Is talking abojut SQL_BINARY, not PG_BYTEA being deprecated as a type 
name.

You use quote when building statements inline, like:

my $modelq=$dbh->quote($model);

 $stmt=qq(select id, model from tbl1 where model = $modelq)


Susan Cassidy




Tom Allison <[EMAIL PROTECTED]> 
05/25/2007 04:15 AM

To
[EMAIL PROTECTED]
cc
General PostgreSQL List <pgsql-general@postgresql.org>
Subject
Re: [GENERAL] bytea & perl






I think the quote() part for bytes is deprecated already?

    my $string = "(" . join($glue, map{$dbh->quote($_,PG_BYTEA)} @$tokens) 
. ")";

returns 
Unknown type 17, defaulting to VARCHAR
as a warning...

On May 24, 2007, at 1:11 PM, [EMAIL PROTECTED] wrote:


Hi, 

First, I would advise never using " insert into xx values (y,x)" without 
explicitly naming the columns;  same for select statements - never use 
select * (a table change can mess things up). 

By the way, I just noticed in the release notes for the very latest couple 
of versions of DBD:Pg that some placeholder changes were made.  You might 
want to check the release notes and your version of DBD:Pg about your 
placeholder issues. 




----------------------------------------------------------------------------------------------
Simply protected storage solutions ensure that your information is
automatically safe, readily available and always there, visit us at 
http://www.overlandstorage.com
----------------------------------------------------------------------------------------------

Reply via email to