Received: from socrates.catalyst.net.nz (socrates.catalyst.net.nz [203.96.153.226]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f8R0ACh23663 for ; Wed, 26 Sep 2001 20:10:13 -0400 (EDT) (envelope-from andrew@catalyst.net.nz) Received: from heidegger.catalyst.net.nz (hume.catalyst.net.nz [203.96.153.228]) by socrates.catalyst.net.nz (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id MAA25310; Thu, 27 Sep 2001 12:10:02 +1200 X-Authentication-Warning: socrates.catalyst.net.nz: Host hume.catalyst.net.nz [203.96.153.228] claimed to be heidegger.catalyst.net.nz Received: from 127.0.0.1 (ident=unknown) by heidegger.catalyst.net.nz with esmtp (MasqMail 0.1.15) id 15mOk8-28C-00; Thu, 27 Sep 2001 12:09:32 +1200 Subject: Re: max length of varchar returned from a function From: Andrew McMillan To: roypgsqlphp@xemaps.com Cc: pgsql-php@postgresql.org In-Reply-To: <200109262210.f8QMAah01996@postgresql.org> References: <200109262210.f8QMAah01996@postgresql.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/0.13 (Preview Release) Date: 27 Sep 2001 12:09:32 +1200 Message-Id: <1001549372.6939.18.camel@kant.mcmillan.net.nz> Mime-Version: 1.0 X-Archive-Number: 200109/27 X-Sequence-Number: 548 On Thu, 2001-09-27 at 10:09, roypgsqlphp@xemaps.com wrote: > Can anyone tell me what the maximum length of a varchar returned from a plpgsql function is? > It depends on your version of PostgreSQL, but it should be of the order of 100's of MB with current versions. Using LZTEXT type with 7.0 I was retrieving fields up to around 100-200k (depending on compressibility), but 7.1 implements automatic offloading/compressing of large fields. I don't believe there should be current limitations in the implementation of pl/pgsql which would impose lower limits on these things than are imposed by the database field types. Someone will no doubt correct me if I am wrong :-) Regards, Andrew. -- -------------------------------------------------------------------- Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7217 MOB: +64(21)635-694 OFFICE: +64(4)499-2267