Re: bytea

Поиск
Список
Период
Сортировка
От scott.marlowe
Тема Re: bytea
Дата
Msg-id Pine.LNX.4.33.0405111401150.23073-100000@css120.ihs.com
обсуждение исходный текст
Ответ на Re: bytea  (Dennis Gearon <gearond@fireserve.net>)
Ответы Re: bytea  (David Garamond <lists@zara.6.isreserved.com>)
Список pgsql-general
On Tue, 11 May 2004, Dennis Gearon wrote:

> Thanks for all the answers everybody, but I need to know also an answer
> to the other question:
>
> Does the bytea make its own files automatically for large objects?

Bytea doesn't use large objects, which are kind of an artifact left over
from the days of the 8k row limit.  They use what are called "toast"
tables.  Toast tables allow for text/varchar/bytea types to overflow from
the base table as needed to occupy up to ~2 gigabytes of drive space per
field max.  Note that I'm pretty sure no one's really tried to put 2 gig
in one field, as that would probably take quite some time, and I'm not
sure how well most clients are gonna handle getting back a row with a 2
gig field in it. :-)

And yes, toasting is fully automatic.  Just insert a large
text/varchar/bytea field and the database does the rest.  which is why
they are generally recommended over using large objects, which require
specialized handling.

> Also, how about backups with tables having bytea columns.?

Just like any other field.  pg_dump will escape them as needed to make a
usable backup.



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

Предыдущее
От: "scott.marlowe"
Дата:
Сообщение: Re: security question
Следующее
От: CSN
Дата:
Сообщение: template1, createdb, schemas, and owners