pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeremy Finzel <finzelj@gmail.com>
Cc: Postgres General <pgsql-general@postgresql.org>
Subject: Re: Mimic parse bind execute in psql?
Date: Fri, 29 Dec 2017 11:21:05 -0500
Message-ID: <21731.1514564465@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMa1XUjA4tXyYkrDjpm9S5epcgZCt_viTt4d57fYWYhe5WXwAQ@mail.gmail.com>
References: <CAMa1XUjA4tXyYkrDjpm9S5epcgZCt_viTt4d57fYWYhe5WXwAQ@mail.gmail.com>

Jeremy Finzel <finzelj@gmail.com> 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




view thread (2+ messages)

Message-ID: <21731.1514564465@sss.pgh.pa.us>
Permalink:  ../21731.1514564465@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/21731.1514564465@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, finzelj@gmail.com
  Subject: Re: Mimic parse bind execute in psql?
  In-Reply-To: <21731.1514564465@sss.pgh.pa.us>
  References: <CAMa1XUjA4tXyYkrDjpm9S5epcgZCt_viTt4d57fYWYhe5WXwAQ@mail.gmail.com> <21731.1514564465@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox