Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dClsy-00025a-QH for pgsql-performance@arkaria.postgresql.org; Mon, 22 May 2017 11:52:28 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dClsy-0004sg-B8 for pgsql-performance@arkaria.postgresql.org; Mon, 22 May 2017 11:52:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dClrC-0001nt-JB for pgsql-performance@postgresql.org; Mon, 22 May 2017 11:50:38 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dClr8-0002NW-RE for pgsql-performance@postgresql.org; Mon, 22 May 2017 11:50:38 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v4MBoG2g021709; Mon, 22 May 2017 07:50:16 -0400 From: Tom Lane To: Simon Riggs cc: Riaan Stander , "pgsql-performa." Subject: Re: Bulk persistence strategy In-reply-to: References: <04c901d2a753$f55de020$e019a060$@exa.co.za> <15c29aeedc8.27e1.e05fafc80f8daf1488764675043d44fb@exa.co.za> <32403.1495377186@sss.pgh.pa.us> <0e47ae52-e80a-fd8e-021c-7c8cc0495b26@exa.co.za> <30684.1495406234@sss.pgh.pa.us> Comments: In-reply-to Simon Riggs message dated "Mon, 22 May 2017 06:15:26 +0100" Date: Mon, 22 May 2017 07:50:15 -0400 Message-ID: <64473.1495453815@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Simon Riggs writes: > It sounds like you don't know about anonymous code blocks with DO > https://www.postgresql.org/docs/devel/static/sql-do.html No, the problem was that there are also some parameters to be passed in from the application, and DO doesn't take any parameters; so that would require inserting them manually into the DO text, with all the attendant hazards of getting-it-wrong. We've speculated before about letting DO grow some parameter handling, but it's not gotten to the top of anyone's to-do list. regards, tom lane -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance