Re: how to store more than 3 MB of character data in Postgres Varchar field - Mailing list pgsql-sql

From Tom Lane
Subject Re: how to store more than 3 MB of character data in Postgres Varchar field
Date
Msg-id 25834.1118068275@sss.pgh.pa.us
Whole thread Raw
In response to how to store more than 3 MB of character data in Postgres Varchar field  (Vadivel Subramaniam <vadivel.subramaniam@flextronicssoftware.com>)
List pgsql-sql
Vadivel Subramaniam <vadivel.subramaniam@flextronicssoftware.com> writes:
> 2. create table utilntmlscripts (name character varying, data character
> varying(10485770));
>       ERROR:  length for type 'varchar' cannot exceed 10485760
>       It's not allowing more than 10 MB of size during table creation.

Use type "text", or equivalently varchar with no length specification.

The 1-MB limit on what you can write as a length spec is somewhat
arbitrary, but certainly an enforced length spec larger than that
would be a completely arbitrary number as well ...
        regards, tom lane


pgsql-sql by date:

Previous
From: "ON.KG"
Date:
Subject: What is faster?
Next
From: Tom Lane
Date:
Subject: Re: ARRAY() returning NULL instead of ARRAY[] resp. {}