Printing command string passed to EXECUTE command in plpgsql (after argument resolution)

From: Allan Kamau <kamauallan(at)gmail(dot)com>
To: Postgres General Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Printing command string passed to EXECUTE command in plpgsql (after argument resolution)
Date: 2010-10-28 14:25:47
Message-ID: AANLkTi=4_zpa-d6gqqQ+4cS6HSBAY6G138x-EGfjjXi1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am debugging a plpgsql function which contains a long sql query
consisting of several parameters which is executed using EXECUTE
command. I would like to output this command string including the
actual values of the parameters contained within it so I can obtain
the actual query and run it directly (manually) in psql (or other
client such as pgAdmin3). Or at least is possible to output the
command string as is, followed by the parameter resolution details
such as $1='2', $2='abc' and so on.

Allan.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message dan.m.harris 2010-10-28 14:30:34 Re: Can't take base back up with Postgres 9.0 on Solaris 10
Previous Message Adrian Klaver 2010-10-28 14:05:49 Re: Can't take base back up with Postgres 9.0 on Solaris 10