Skip site navigation (1) Skip section navigation (2)

Quoting '?' placeholder in Perl's DBD::Pg?

From: Lincoln Yeoh <lyeoh(at)pop(dot)jaring(dot)my>
To: pgsql-general(at)postgresql(dot)org
Subject: Quoting '?' placeholder in Perl's DBD::Pg?
Date: 2001-09-27 16:40:50
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
Hi anyone know how I can quote or turn off the ? placeholder in Perl's

I've asked on the perl modules newsgroups but I didn't get any satisfactory

Say I'm constructing a custom SQL query and it turns out that there is a ?
somewhere, how do I quote it out? It gets recognised as a placeholder by
the DBD::Pg driver.
my $SQL=<<"EOT";
insert into blah (a,b) values ('asdad?rerwe','blah')

The ? gets interpreted as a placeholder.

Sure I can do 
my $SQL=<<"EOT";
insert into blah (a,b) values (?,?)

And do the execute thing. But if the number of columns changes from query
to query, and so on it might be less convenient to use placeholders.

If it really can't be done, then yeah I'll use placeholders. But it seems
strange if you can't.



pgsql-general by date

Next:From: Doug McNaughtDate: 2001-09-27 16:41:02
Subject: Re: New To PostgreSQL
Previous:From: Lincoln YeohDate: 2001-09-27 16:23:47
Subject: Re: Encoding passwords

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group