Maximum size for char or varchar with limit

From: Rob Gansevles <rgansevles(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Maximum size for char or varchar with limit
Date: 2010-12-08 13:47:25
Message-ID: AANLkTi=X2nx7WK-K-mTz5AbJYY-v9C+o7R9MwrHjd5b7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert Gravsjö 2010-12-08 14:01:38 Re: [GENERAL] Asynchronous query execution
Previous Message John R Pierce 2010-12-08 13:40:32 Re: Asynchronous query execution