Re: Storing images as BYTEA or large objects
От | Peter Wilson |
---|---|
Тема | Re: Storing images as BYTEA or large objects |
Дата | |
Msg-id | 47B30B0F.3050206@yellowhawk.co.uk обсуждение исходный текст |
Ответ на | Re: Storing images as BYTEA or large objects (Koen Vermeer <koen@vermeer.tv>) |
Ответы |
Re: Storing images as BYTEA or large objects
|
Список | pgsql-general |
Koen Vermeer wrote: > On Wed, 2008-02-13 at 09:35 +0000, Peter Wilson wrote: > >> My preference : if I don't need the file-like interface to large objects >> I'd use BYTEA every time. >> > > Right, so that basically means that when 'large objects' are files, > which should be saved and restored as a whole, it may be more natural to > use the large objects. I guess that applies to some uses of media > storage (music, photos, video). > No - I meant the Postgres large object interface allows you to read and write sections of a large object. It provides a seek/read/write interface. If you're only going to read or write the whole contents as a single block then use BYTEA. In my case I store uploaded images as BYTEA - I only every need to read/write the image as a whole. If you were dealing with very large images/music/video in a web environment then I could see a web application wanting to read a chunk - write to the web client - read next chunk etc and thus avoid the overhead of the entire contents being in memory at one time. That probably doesn't help with upload though. Pete -- http://www.whitebeam.org - JavaScript web application server. http://www.yellowhawk.co.uk > The large-objects-are-actually-files thing applies to my situation, so > unless there is some 'large objects are / will be deprecated' argument, > I guess I stick with large objects. > > Thanks! > > Koen > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org/ > > -- ------------------------------------------------------------------------ Peter Wilson T: 01707 891840 M: 07796 656566 http://www.yellowhawk.co.uk The information in this email is confidential and is intended for the addressee/s only. Access to this email by anyone else is unauthorised. If you are not the intended recipient, you must not read, use or disseminate the information contained in or attached to this email.
В списке pgsql-general по дате отправления: