By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,773 Members | 1,724 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,773 IT Pros & Developers. It's quick & easy.

capacity of datatype "text"

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a

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.