Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: PostGreSQL Quoting

by tantarbobus (Hermit)
on Aug 12, 2004 at 19:19 UTC ( #382436=note: print w/replies, xml ) Need Help??


in reply to Re^2: PostGreSQL Quoting
in thread PostGreSQL Quoting

DBI seems to want to connect to the database first. Is there any way to avoid that?

Maybe:
You can try this:

use DBI; my $drh = DBI->install_driver('Pg') or die; my $dbh = DBI::_new_dbh($drh) or die; print $dbh->quote(q{My "" test ' data \\' for quoting'}), "\n";

Of course you would be violating all sorts of good programming practices and there is no guarantee that 1. it will work consistantly and 2. it won't segfault, but if it works, it works.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://382436]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2019-10-15 04:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?