X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id AFF439FA5C8 for ; Thu, 8 Jun 2006 12:38:13 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 69380-03 for ; Thu, 8 Jun 2006 12:38:07 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 860949F9EF3 for ; Thu, 8 Jun 2006 12:38:07 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id 428BA56437; Thu, 8 Jun 2006 10:37:51 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Thu, 8 Jun 2006 10:37:50 -0500 Date: Thu, 8 Jun 2006 10:37:50 -0500 From: "Jim C. Nasby" To: Ludek Finstrle Cc: pgsql-admin@postgresql.org Subject: Re: Maximum text and bytea size? Message-ID: <20060608153750.GN45331@pervasive.com> References: <20060608091802.GA32622@soptik.pzkagis.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060608091802.GA32622@soptik.pzkagis.cz> X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060608:luf@pzkagis.cz::sSlznQpygYf3qsI6:00007Lw X-Hashcash: 1:20:060608:pgsql-admin@postgresql.org::hm6KI7UKuqQxfvDo:00000000000 0000000000000000000000003LI+ X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/57 X-Sequence-Number: 22019 On Thu, Jun 08, 2006 at 11:18:02AM +0200, Ludek Finstrle wrote: > Hello, > > I'm not sure if I understand documentation the right way. > Is the maximum size for text and bytea types 2^30-1 bytes? > I read this value in TOAST section. Is my opinion correct? From http://www.postgresql.org/docs/8.1/interactive/storage-toast.html: "TOAST usurps the high-order two bits of the varlena length word, thereby limiting the logical size of any value of a TOAST-able data type to 1Gb (2^30 - 1 bytes)." There was a proposal made some time ago to allow for a variable-length length word format, where one of the bits in each word would specify that there was an additional length word. That would theoretically allow for an unlimited size on verlena columns. I don't remember what the outcome of that discussion was, though. You should be able to find it in the archives with enough digging. -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461