Re: what is maximum size of "text" datatype in postgres?

From: Christopher Browne <cbbrowne(at)acm(dot)org>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: what is maximum size of "text" datatype in postgres?
Date: 2004-09-13 09:31:30
Message-ID: m33c1mjz0t.fsf@wolfe.cbbrowne.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Centuries ago, Nostradamus foresaw when smitamarda(at)yahoo(dot)co(dot)uk ("Smit") would write:
> i wanted to know, what is maximum size of "text"
> datatype in postgres.
> It is given as "unlimited characters" in the postgres
> documentation.
> But it doesn't store characters more than 5000. The
> connection get lost if i tried to store more than 5000
> characters.
>
> I had read somewhere on forum that its max limit is 8
> bytes, and we can increase it to 32 bytes.

8 bytes is certainly not the right answer.

Creating a little table, and throwing some wide strings at it...

tutorial=# create table widetext (main text);
CREATE
tutorial=# insert into widetext values ('0123456789... repeated a
bunch of times...');
INSERT 2625519 1
... increasing size each time, for several instances ...

tutorial=# select length(main) from widetext;
length
--------
1100
5500
11000
(3 rows)

That's way more than 8 bytes; that's way more than 5000 bytes.

> Do any one know how to increse it? or do anyone know any other way
> to solve this problem.

What tool are you using to insert the data?

Is it possible that it has some buffer size limitation that is biting
you?
--
"cbbrowne","@","ntlug.org"
http://linuxfinances.info/info/
"My experience as a member of the APB (Accounting Principles Board)
taught me many lessons. A major one was that most of us have a
natural tendency and an incredible talent for processing new facts in
such a way that our prior conclusions remain intact."
-- Charles Horngren

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message David Garamond 2004-09-13 15:03:32 Interpolation and extrapolation in SQL
Previous Message Smit 2004-09-13 08:35:54 what is maximum size of "text" datatype in postgres?