X-Original-To: pgsql-patches-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id B7A4A9FB2CD for ; Tue, 18 Jul 2006 13:27: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 49188-01 for ; Tue, 18 Jul 2006 13:27:05 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from trolak.mydnsbox2.com (ns1.mydnsbox2.com [207.44.142.118]) by postgresql.org (Postfix) with ESMTP id D7EEE9FB3AF for ; Tue, 18 Jul 2006 11:36:23 -0300 (ADT) Received: from [192.168.1.219] (68.143.134.146.nw.nuvox.net [68.143.134.146]) (authenticated (0 bits)) by trolak.mydnsbox2.com (8.11.6/8.11.6) with ESMTP id k6IE2Kg05104; Tue, 18 Jul 2006 09:02:20 -0500 Message-ID: <44BCF1D4.3010807@dunslane.net> Date: Tue, 18 Jul 2006 10:36:04 -0400 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060418 CentOS/1.7.13-1.4.1.centos4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Christopher Kings-Lynne CC: Joe Conway , Bernd Helmle , Peter Eisentraut , "Patches (PostgreSQL)" , Susanne Ebrecht Subject: Re: [HACKERS] 8.2 features? References: <44B69778.5050104@dunslane.net> <50461.84.63.113.55.1152832991.squirrel@pezone.net> <44B7ADFC.90205@dunslane.net> <44BC0432.3040509@joeconway.com> <44BC661F.80609@joeconway.com> <44BCD06C.3060409@calorieking.com> In-Reply-To: <44BCD06C.3060409@calorieking.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/137 X-Sequence-Number: 20291 Christopher Kings-Lynne wrote: >> The major downside is that somewhere between 9000 and 10000 >> VALUES-targetlists produces "ERROR: stack depth limit exceeded". >> Perhaps for the typical use-case this is sufficient though. >> >> I'm open to better ideas, comments, objections... > > > If the use case is people running MySQL dumps, then there will be > millions of values-targetlists in MySQL dumps. > > Yeah. The fabricated select hack does feel wrong to me. Taking a quick 2 minute look at the grammar it looks like a better bet would be to make InsertStmt.targetList a list of lists of values rather than just a list of values. Of course, that would make the changes more invasive. Even with that we'd still be reading the whole thing into memory ... is there a sane way to cache the inline data before statement execution? I guess we can just say that for true bulk load our supported mechanism is still just COPY, but it would be a pity to restrict a feature that is in the standard that way. cheers andrew