pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Vadivel Subramaniam <vadivel.subramaniam@flextronicssoftware.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: how to store more than 3 MB of character data in Postgres Varchar field
Date: Mon, 06 Jun 2005 10:31:15 -0400
Message-ID: <25834.1118068275@sss.pgh.pa.us> (raw)
In-Reply-To: <OFD54B33E3.AEC7F197-ON65257018.00386389-65257018.00388347@flextronicssoftware.com>
References: <OFD54B33E3.AEC7F197-ON65257018.00386389-65257018.00388347@flextronicssoftware.com>

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



view thread (4+ messages)

Message-ID: <25834.1118068275@sss.pgh.pa.us>
Permalink:  ../25834.1118068275@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25834.1118068275@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, vadivel.subramaniam@flextronicssoftware.com
  Subject: Re: how to store more than 3 MB of character data in Postgres Varchar field
  In-Reply-To: <25834.1118068275@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox