From: | Sam Mason <sam(at)samason(dot)me(dot)uk> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Use PSQLFS for photo storage |
Date: | 2009-01-14 00:56:42 |
Message-ID: | 20090114005642.GO3008@frubble.xen.chris-lamb.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Jan 13, 2009 at 06:43:06PM -0600, Jason Long wrote:
> Sam Mason wrote:
> >If you're OK with using large objects, instead of "bytea"s, you can use
> >the lo_import function.
>
> *They are on the server. I would rather use bytea. Is it possible to
> import them as large objects and then use SQL to convert them to bytea?*
You can, but it's pretty backward. If you Java you'd probably be better
off using it to slurp in the file and do the insert there. If you
really want to use large objects to go to byteas have a look through the
client side API[1] and then at the functions available to call from SQL
by doing \df from psql as they mirror the client calls very closely.
Be aware that you'll be creating a lot more "garbage" that PG will have
to clean out, so importing many gigabytes of data this way will take
much longer.
Sam
From | Date | Subject | |
---|---|---|---|
Next Message | Sam Mason | 2009-01-14 01:00:27 | Re: Use PSQLFS for photo storage |
Previous Message | Jason Long | 2009-01-14 00:43:06 | Re: Use PSQLFS for photo storage |