Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In the official documentation (, it states text field is variable unlimited length.

I wonder what is the default size of this field (or minimum size of the field)?

share|improve this question
No such things. – Milen A. Radev Nov 1 '13 at 7:45

The default minimum size of a text column (representing a NULL value) depends on the rest of the row. In most cases it is absolutely free, if the NULL bitmap has room for another bit.

More about calculating the effective row size:

share|improve this answer

By default such a column will be NULL (essentially zero-length, though remember there is a difference between a zero-length string and a NULL) unless you specify a default constraint in the table definition, and it will grow as needed when you insert data.

If you are asking how much space it takes on disk then this will never be completely zero of course, but there are few times when the minimum size is truly significant (if you are storing millions of rows with very short or mostly NULL text fields it might be). Assuming postgres' storage engine uses a structure not dissimilar to MSSQL then if they are stored off-page (small values are likely to be stored in-page) there will be a page reference (8 bytes?) to find the start of the string - so you might consider that, plus space in NULL bitmap and any other flags such as in-or-off-page, as the minimum footprint of such a type.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.