Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

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?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2023-02-05 09:52 GMT
Find Nodes?
    Voting Booth?
    I prefer not to run the latest version of Perl because:

    Results (31 votes). Check out past polls.