Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: postgresql bytea escaping

by tantarbobus (Hermit)
on Jan 10, 2006 at 16:13 UTC ( [id://522222]=note: print w/replies, xml ) Need Help??


in reply to postgresql bytea escaping

How about just using the C API (via DBD::Pg) provided by pg? So:

 $quoted_data = $dbh->quote($data, PG_BYTEA)

Replies are listed 'Best First'.
Re^2: postgresql bytea escaping
by ketema (Scribe) on Jan 11, 2006 at 02:14 UTC
    That is a good idea. My original plan was to make this simple function an internal pl/perlu function so i could just code Insert statements like Insert into table (byteacol) values (encode_bytea('/path/to/bin/file')::bytea); But since it is a perlu function anyway I will test using the DBD Module in the function instead.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2024-04-18 16:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found