Обсуждение: capacity of datatype "text"

Поиск
Список
Период
Сортировка

capacity of datatype "text"

От
johnossmann@yahoo.com (John Ossmann)
Дата:
I'm not sure where to find it exactly, but does anyone know how much
data a column of type "text" in a postgres DB can hold?

Thanks

Re: capacity of datatype "text"

От
Neil Conway
Дата:
On Wed, 2004-10-13 at 14:58, John Ossmann wrote:
> I'm not sure where to find it exactly, but does anyone know how much
> data a column of type "text" in a postgres DB can hold?

There is no limit on what "text" itself can contain. However, a field of
any data type can contain at most 1GB (compressed -- Postgres will do
this compression automatically). See:

http://www.postgresql.org/docs/faqs/FAQ.html#4.5

-Neil



Re: capacity of datatype "text"

От
David Garamond
Дата:
John Ossmann wrote:
> I'm not sure where to find it exactly, but does anyone know how much
> data a column of type "text" in a postgres DB can hold?

it's in the manual, in the Data Types section. the manual says "around 1GB".

btw, TEXT is one of those postgres-specific features that makes you
stick (stuck? :-) with postgres. nowadays, i never ever have to bother
to think whether to give a column a max width of 32, 50, 64, 100, 150,
... is that a bad thing?

--
dave

Re: capacity of datatype "text"

От
John DeSoi
Дата:
On Oct 19, 2004, at 1:14 AM, David Garamond wrote:

> btw, TEXT is one of those postgres-specific features that makes you
> stick (stuck? :-) with postgres. nowadays, i never ever have to bother
> to think whether to give a column a max width of 32, 50, 64, 100, 150,
> ... is that a bad thing

I don't think it is a bad thing. Unless there is a clear and specific
limit related to the domain, why create one? You can create a last name
field with 20, 30, or 50 characters but there are no rules in the world
that will ensure you picked the right limit.

I guess it is only a bad thing if you have to consider porting your
PostgreSQL database. Hopefully it won't ever happen :).

Best,

John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL