Re: Use PSQLFS for photo storage

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: Use PSQLFS for photo storage
Дата
Msg-id 20090114005642.GO3008@frubble.xen.chris-lamb.co.uk
обсуждение исходный текст
Ответ на Re: Use PSQLFS for photo storage  (Jason Long <mailing.list@supernovasoftware.com>)
Ответы Re: Use PSQLFS for photo storage
Список 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

В списке pgsql-general по дате отправления:

Предыдущее
От: Jason Long
Дата:
Сообщение: Re: Use PSQLFS for photo storage
Следующее
От: Sam Mason
Дата:
Сообщение: Re: Use PSQLFS for photo storage