Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUxPH-0005bn-QX for pgsql-general@arkaria.postgresql.org; Fri, 29 Dec 2017 16:21:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUxPH-0003ir-6h for pgsql-general@arkaria.postgresql.org; Fri, 29 Dec 2017 16:21:15 +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 1eUxPG-0003id-Vf for pgsql-general@lists.postgresql.org; Fri, 29 Dec 2017 16:21:15 +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.89) (envelope-from ) id 1eUxPA-0006St-GR for pgsql-general@postgresql.org; Fri, 29 Dec 2017 16:21:14 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id vBTGL52O021732; Fri, 29 Dec 2017 11:21:05 -0500 From: Tom Lane To: Jeremy Finzel cc: Postgres General Subject: Re: Mimic parse bind execute in psql? In-reply-to: References: Comments: In-reply-to Jeremy Finzel message dated "Fri, 29 Dec 2017 09:44:51 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <21730.1514564465.1@sss.pgh.pa.us> Date: Fri, 29 Dec 2017 11:21:05 -0500 Message-ID: <21731.1514564465@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Jeremy Finzel writes: > If I want to mimic a log statement that is from an application that uses > PARSE/BIND/EXECUTE, is there any way to mimic this behavior in psql, for > example to troubleshoot execution plans, other than writing a named > prepared statement, or manually subbing the parameters? psql hasn't any way to do that. You might consider pgbench as a possible substitute though --- not only can it do PARSE/BIND/EXECUTE, but you can insert appropriate parameter values via variables. regards, tom lane