TEXT field's length limit in PostgreSQL

Started by Michał 'Samuel' Modestowiczover 24 years ago4 messagesgeneral
Jump to latest

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

#2Dr. Evil
drevil@sidereal.kz
In reply to: Michał 'Samuel' Modestowicz (#1)
Re: TEXT field's length limit in PostgreSQL

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.

#3Brett W. McCoy
bmccoy@chapelperilous.net
In reply to: Michał 'Samuel' Modestowicz (#1)
Re: 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.

#4Holt, Jack C.
JACK.C.HOLT@saic.com
In reply to: Brett W. McCoy (#3)
Re: TEXT field's length limit in PostgreSQL

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