Re: Maximum size for char or varchar with limit

From: Rob Gansevles <rgansevles(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Maximum size for char or varchar with limit
Date: 2010-12-08 15:06:07
Message-ID: AANLkTik5q6nfd8Oj8ZrVmxp6hsnrYicWPTe3Np4Tyc8m@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Adrian,

Thanks for the reply, but this refers to max row or field size, it
does not tell me where the max varchar limit of 10485760 comes from
and if this is fixed or whether it depends on something else

Has anyone some info on this?

Rob

On Wed, Dec 8, 2010 at 3:34 PM, Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> wrote:
> On Wednesday 08 December 2010 5:47:25 am Rob Gansevles wrote:
>> Hello,
>>
>> Does anyone know what the maximum length is for char or varchar
>> columns with limit.
>> I saw some answers to this same question referring to section 8.3 of
>> the docs, but I don't see the actual numbers there.
>>
>> I know you can go to 1GB if you don't specify the limit, but I would
>> like to know what the max limit is you can use.
>>
>> It seems to be 10485760 in my install.
>> Is this fixed in PostgreSQL or does it depend on some configuration
>> setting? Does it depend on the version (I am using 8.4)?
>>
>>
>> Here is my test-sql:
>>
>> create table test (x varchar(100000000))
>>
>> Error: ERROR: length for type varchar cannot exceed 10485760
>> SQLState:  22023
>> ErrorCode: 0
>>
>> Thanks in advance,
>>
>> Rob
>
> I think you are looking for this:
> http://wiki.postgresql.org/wiki/FAQ#What_is_the_maximum_size_for_a_row.2C_a_table.2C_and_a_database.3F
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)gmail(dot)com
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2010-12-08 15:19:27 Re: Maximum size for char or varchar with limit
Previous Message Dmitriy Igrishin 2010-12-08 15:03:32 Re: OID of type by name.