Quoting '?' placeholder in Perl's DBD::Pg? - Mailing list pgsql-general

From Lincoln Yeoh
Subject Quoting '?' placeholder in Perl's DBD::Pg?
Date
Msg-id 3.0.5.32.20010928004050.008f1b60@192.228.128.13
Whole thread Raw
Responses Re: Quoting '?' placeholder in Perl's DBD::Pg?
Re: Quoting '?' placeholder in Perl's DBD::Pg?
List pgsql-general
Hi anyone know how I can quote or turn off the ? placeholder in Perl's
DBD::Pg?

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

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.
e.g.
my $SQL=<<"EOT";
insert into blah (a,b) values ('asdad?rerwe','blah')
EOT

The ? gets interpreted as a placeholder.

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

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.

Cheerio,
Link.


pgsql-general by date:

Previous
From: Shane Wright
Date:
Subject: backend stalls
Next
From: "Marshall Spight"
Date:
Subject: Re: How to make a REALLY FAST db server?