On Mon, Feb 02, 2004 at 10:11:17AM +0000, Bas Scheffers wrote:
>
> To get them into postgres, I open the file as binary (encoding and
> translation) and read the whole thing. Then I transform the data to Hex
> using "binary scan H* $bindata hexdata" and insert into postgres using
> "insert ... decode('$hexdata', 'hex') ...".Are you sure PG has a decode function? I don't recall one. The way I've seen BLOBs in PostgreSQL was either using PG's lo_* functions, or converting the file to some format that can be stored in a text column (e.g. in OpenACS 3.x we uuencoded it). > Now, this SEEMS to work 100%. But does anyone see a problem with this that > might jump up and bite me one day when I least expect it? Is this common > practice, or is there a better/offical way to do this? One problem is that your backups can get really huge. -Roberto -- +----| Roberto Mello - http://www.brasileiro.net/ |------+ + Computer Science Graduate Student, Utah State University + + USU Free Software & GNU/Linux Club - http://fslc.usu.edu/ + -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.
