Skip site navigation (1) Skip section navigation (2)

Re: wrong information about unlimied size of text field?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Hubert depesz Lubaczewski <depesz(at)depesz(dot)pl>
Cc: pgsql-docs(at)postgresql(dot)org
Subject: Re: wrong information about unlimied size of text field?
Date: 2002-09-03 18:55:37
Message-ID: Pine.LNX.4.44.0209032032310.1157-100000@localhost.localdomain (view raw, whole thread or download thread mbox)
Lists: pgsql-docs
Hubert depesz Lubaczewski writes:

> according to what i know, where is a limit for up to 2gigabytes of data
> in text fields (according to c.h).
> this limit is of course very big, but i belive it should be mentioned in
> datatype.sgml instead of saying:

If you continue reading you will find

    The storage requirement for data of these types is 4 bytes plus
    the actual string, and in case of <type>character</type> plus the
    padding.  Long strings will be compressed by the system
    automatically, so the physical requirement on disk may be less.
    In any case, the longest possible character string
    that can be stored is about 1 GB.  (The maximum value that will be
    allowed for <replaceable>n</> in the data type declaration is
    less than that.  It wouldn't be very useful to change
    this because with multibyte character encodings the number of
    characters and bytes can be quite different anyway.  If you desire
    to store long strings with no specific upper limit, use <type>text</type>
    or <type>character varying</type> without a length specifier,
    rather than making up an arbitrary length limit.)

which seems to be the information you are looking for.

Peter Eisentraut   peter_e(at)gmx(dot)net

In response to


pgsql-docs by date

Next:From: Bruce MomjianDate: 2002-09-03 18:59:34
Previous:From: Bruce MomjianDate: 2002-09-03 18:53:05
Subject: Re: wrong information about unlimied size of text field?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group