Thread: TEXT field's length limit in PostgreSQL

TEXT field's length limit in PostgreSQL

From
"Michał 'Samuel' Modestowicz"
Date:
Hi,

I know that my question may seem trivial, but unfortunately I haven't found
any understandable info on this topic. It's about length limit of the TEXT
field in PostgreSQL. I've heard that the TEXT fields in psql are limited to
4096 bytes but it's just unbelievable for me. So if I've got text of more
than 4096 bytes size, for example article - do I really have to put it in
the LOB field and use these terrific lo-functions to access it ?? Please, if
anyone can help me - write to samuel@netmagia.pl .

Thx in advance,
Michael 'Samuel' Modestowicz





Re: TEXT field's length limit in PostgreSQL

From
"Dr. Evil"
Date:
> I know that my question may seem trivial, but unfortunately I haven't found
> any understandable info on this topic. It's about length limit of the TEXT
> field in PostgreSQL. I've heard that the TEXT fields in psql are limited to
> 4096 bytes but it's just unbelievable for me. So if I've got text of more
> than 4096 bytes size, for example article - do I really have to put it in
> the LOB field and use these terrific lo-functions to access it ?? Please, if
> anyone can help me - write to samuel@netmagia.pl .

Under PG7.0, there was an 8k limit on the size of rows, so you had to
use LOB for things bigger than that, but that limit is gone in PG7.1.
I'm not sure what the max size on TEXT is, but it's much much bigger
than 4096 bytes.  Certainly you could store entire magazine articles
in it.

Re: TEXT field's length limit in PostgreSQL

From
"Brett W. McCoy"
Date:
On Thu, 18 Oct 2001, [iso-8859-2] Micha³ 'Samuel' Modestowicz wrote:

> I know that my question may seem trivial, but unfortunately I haven't found
> any understandable info on this topic. It's about length limit of the TEXT
> field in PostgreSQL. I've heard that the TEXT fields in psql are limited to
> 4096 bytes but it's just unbelievable for me. So if I've got text of more
> than 4096 bytes size, for example article - do I really have to put it in
> the LOB field and use these terrific lo-functions to access it ?? Please, if
> anyone can help me - write to samuel@netmagia.pl .

The limitation is gone in 7.1.  According to the documentation, the length
is unlimited.  Realistically, I think sizes of around 1G are the discrete
limit.

-- Brett
                                          http://www.chapelperilous.net/
------------------------------------------------------------------------
Even moderation ought not to be practiced to excess.


Re: TEXT field's length limit in PostgreSQL

From
"Holt, Jack C."
Date:
Take a look at www.postgresql.org/docs/index.php?datatype-character.html. Be
sure to take a look at the comments at the bottom of the page. The
documentation agrees with you, but Peter Eisentraut gives a different take.

 -----Original Message-----
From:     Brett W. McCoy [mailto:bmccoy@chapelperilous.net]
Sent:    Thursday, October 18, 2001 6:50 AM
To:    Michal 'Samuel' Modestowicz
Cc:    pgsql-general@postgresql.org
Subject:    Re: [GENERAL] TEXT field's length limit in PostgreSQL

On Thu, 18 Oct 2001, [iso-8859-2] Micha³ 'Samuel' Modestowicz wrote:

> I know that my question may seem trivial, but unfortunately I haven't
found
> any understandable info on this topic. It's about length limit of the TEXT
> field in PostgreSQL. I've heard that the TEXT fields in psql are limited
to
> 4096 bytes but it's just unbelievable for me. So if I've got text of more
> than 4096 bytes size, for example article - do I really have to put it in
> the LOB field and use these terrific lo-functions to access it ?? Please,
if
> anyone can help me - write to samuel@netmagia.pl .

The limitation is gone in 7.1.  According to the documentation, the length
is unlimited.  Realistically, I think sizes of around 1G are the discrete
limit.

-- Brett
                                          http://www.chapelperilous.net/
------------------------------------------------------------------------
Even moderation ought not to be practiced to excess.


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html