471,090 Members | 1,316 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,090 software developers and data experts.

capacity of datatype "text"

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
Nov 23 '05 #1
3 7610
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

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 23 '05 #2
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

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #3

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

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Kivak Wolf | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.