Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Sure it is difficult inserting binary data, but you can avoid it! Use the lo* family of commands that will manage (upload/download, read/write/seek, etc.,) binary files to postgresql; alternatively and preferably, use the equivalent \lo-import, \lo_export, and \lo_list commands from psql.

These tools is more than enough for the job. If you want more tools to manage binary data, use the lo.sql and lo_drop.sql from the contrib section.

Furthermore, you can always avoid dealing with binary data if you encode them to ascii (say using base64) and don't mind a little extra storage space.

Oh, and you might also choose to avoid both methods (both the binary or ascii data) by using links or references to files on disk instead of storing the data inside the database.

Now you better alternatives.


In reply to Re: postgresql bytea escaping by ioannis
in thread postgresql bytea escaping by ketema

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-03-28 21:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found