X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id EC0DA30DBDA for ; Wed, 18 Jun 2003 13:25:21 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 55428-03 for ; Wed, 18 Jun 2003 10:25:11 -0300 (ADT) Received: from mail1.ihs.com (mail1.ihs.com [170.207.70.222]) by svr1.postgresql.org (Postfix) with ESMTP id 1C40C30DC0C for ; Wed, 18 Jun 2003 10:25:11 -0300 (ADT) Received: from css120.ihs.com (css120.ihs.com [170.207.105.120]) by mail1.ihs.com (8.12.9/8.12.9) with ESMTP id h5IDMl4w021779; Wed, 18 Jun 2003 07:22:47 -0600 (MDT) Date: Wed, 18 Jun 2003 07:21:23 -0600 (MDT) From: "scott.marlowe" To: Rudi Starcevic Cc: Subject: Re: Text insert max. size. In-Reply-To: <20030618120204.M81390@oasis.net.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-MailScanner: Found to be clean X-MailScanner-SpamCheck: X-Archive-Number: 200306/214 X-Sequence-Number: 13972 On Wed, 18 Jun 2003, Rudi Starcevic wrote: > Hi, > > I'm doing some planning for storing some xml data and am wondering > what is the maximum amount I could insert with one SQL statement. There's no limit to max SQL statement size in postgresql, but practically, you might want a REALLY big machine if you're gonna toss around 100 megs in a single query. > For example if I read an xml file off the hard drive and wanted to store > that in a text column what would be the largest file I could insert. > How about a 10 KB file ? How about 1 gig. Nice limit, eh? :-) > I guess also each programing language may have limitations too. > I this case I'm interested in using PHP. Generally you're gonna hit a limit with the max memory size set in the php.ini file, which defaults to 8 meg max process size before abort. You can crank this up so high your machine starts to swap out. I'd guess PHP is likely limited to some number internally, but I've messed around with a hundred or so megs before. If you wanna build a HUGE SQL query, you're likely better off to use fread and build the query in a file then run it with `psql dbname