X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E3734528DD for ; Mon, 6 Jun 2005 11:32:06 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 93029-05 for ; Mon, 6 Jun 2005 14:31:57 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 5F069528CA for ; Mon, 6 Jun 2005 11:31:56 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j56EVFVs025835; Mon, 6 Jun 2005 10:31:15 -0400 (EDT) To: Vadivel Subramaniam Cc: pgsql-sql@postgresql.org Subject: Re: how to store more than 3 MB of character data in Postgres Varchar field In-reply-to: References: Comments: In-reply-to Vadivel Subramaniam message dated "Mon, 06 Jun 2005 15:47:16 +0530" Date: Mon, 06 Jun 2005 10:31:15 -0400 Message-ID: <25834.1118068275@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/80 X-Sequence-Number: 21681 Vadivel Subramaniam 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