Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: postgresql bytea escaping

by tantarbobus (Hermit)
on Jan 10, 2006 at 16:13 UTC ( #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
Node Status?
node history
Node Type: note [id://522222]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2019-10-22 13:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?