Re: [GENERAL] Can I store bitmap graphics in a table?

Поиск
Список
Период
Сортировка
От Dustin Sallings
Тема Re: [GENERAL] Can I store bitmap graphics in a table?
Дата
Msg-id ML-3.5-SPY.901069158.5758.dustin@bleu.west.spy.net
обсуждение исходный текст
Ответ на Re: [GENERAL] Can I store bitmap graphics in a table?  (Dan Delaney <dionysos@dionysia.org>)
Ответы Re: [GENERAL] Can I store bitmap graphics in a table?  (Peter T Mount <peter@retep.org.uk>)
Список pgsql-general
> On Tue, 21 Jul 1998, Matt McClure wrote:
> > You can insert the graphic file by declaring the type to be OID and using
> >  lo_import().
>
> That sounds like it might work. I'll give it a try. However, the
> graphics I'm going to be inserting are not very large, like 50 to
> 100k, I'd like to be able to do it without using the large object
> interface. Anyone have any ideas?

    I'm actually base64 encoding images for my photo album and storing them
in normal tables as char fields.  I've currently got 147 images stored in
146464 rows.  Seems to work OK.

    I had initially thought to use BLOBs, but there were a few things I
didn't like about Postgres BLOBs:

    a) Stored in multiple files on the backend in the same directory as
       the rest of the data.  I would have a lot of directory entries
       right now.

    b) Couldn't figure out how to delete a BLOB and have it go away (since
       you only store the reference to the BLOB).

    c) They don't back up with pgdump, which isn't too bad of a problem,
       since I don't mind making my own dump program.

    Is the BLOB interface being worked on at all?  I'd be interested in
making my program do things a little closer to the ``right'' way.  :)  (or
maybe playing with the BLOB interface myself).

--
SA, software.net         My girlfriend asked me which one I like better.
pub  1024/3CAE01D5 1994/11/03 Dustin Sallings <dustin@spy.net>
|    Key fingerprint =  87 02 57 08 02 D0 DA D6  C8 0F 3E 65 51 98 D8 BE
L_______________________ I hope the answer won't upset her. ____________


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

Предыдущее
От: Steve Logue
Дата:
Сообщение: Re: [GENERAL] Postgres vs commercial products
Следующее
От: copa@tlx.com
Дата:
Сообщение: Online Marketing