Re: How to get the content of Bind variables

From: MichaelDBA <MichaelDBA(at)sqlexec(dot)com>
To: ROS Didier <didier(dot)ros(at)edf(dot)fr>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: How to get the content of Bind variables
Date: 2019-02-28 12:36:56
Message-ID: 5C77D5E8.60608@sqlexec.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

If you set log_min_duration_statement low enough for your particular
query, you will see another line below it showing what values are
associated with each bind variable like this:

2019-02-28 00:07:55CST 2019-02-2800:02:09CST ihr2 10.86.42.184(43460)
SELECT LOG: duration: 26078.308 ms execute <unnamed>: select
pg_advisory_lock($1)

2019-02-28 00:07:55CST 2019-02-2800:02:09CST ihr2 10.86.42.184(43460)
SELECT DETAIL: parameters: $1 = '3428922050323511872'

Regards,
Michael Vitale
> ROS Didier <mailto:didier(dot)ros(at)edf(dot)fr>
> Thursday, February 28, 2019 7:21 AM
>
> Hi
>
> In the log file of my PostgreSQL cluster, I find :
>
> >>
>
> *Statement:*update t_shared_liste_valeurs set deletion_date=*$1*,
> deletion_login=*$2*, modification_date=*$3*, modification_login=*$4*,
> administrable=*$5*, libelle=*$6*, niveau=*$7* where code=*$8*
>
> <<
>
> èhow to get the content of the bind variables ?
>
> Thanks in advance
>
> Best Regards
>
> cid:image002(dot)png(at)01D14E0E(dot)8515EB90
>
>
>
> *
> **Didier ROS*
>
> *Expertise SGBD*
>
> EDF - DTEO - DSIT - IT DMA
>
> Département Solutions Groupe
>
> Groupe Performance Applicative
>
> 32 avenue Pablo Picasso
>
> 92000 NANTERRE
>
> _didier*(dot)ros(at)edf(dot)fr* <mailto:didier(dot)ros(at)edf(dot)fr>_
>
> Tél. : +33 6 49 51 11 88
>
> cid:image003(dot)png(at)01D4BE20(dot)1EAF68B0
> <mailto:prenom(dot)nom(at)edf(dot)fr>cid:image004(dot)png(at)01D4BE20(dot)1EAF68B0
> <sip:prenom(dot)nom(at)edf(dot)fr>
>
>
> Ce message et toutes les pièces jointes (ci-après le 'Message') sont
> établis à l'intention exclusive des destinataires et les informations
> qui y figurent sont strictement confidentielles. Toute utilisation de
> ce Message non conforme à sa destination, toute diffusion ou toute
> publication totale ou partielle, est interdite sauf autorisation expresse.
>
> Si vous n'êtes pas le destinataire de ce Message, il vous est interdit
> de le copier, de le faire suivre, de le divulguer ou d'en utiliser
> tout ou partie. Si vous avez reçu ce Message par erreur, merci de le
> supprimer de votre système, ainsi que toutes ses copies, et de n'en
> garder aucune trace sur quelque support que ce soit. Nous vous
> remercions également d'en avertir immédiatement l'expéditeur par
> retour du message.
>
> Il est impossible de garantir que les communications par messagerie
> électronique arrivent en temps utile, sont sécurisées ou dénuées de
> toute erreur ou virus.
> ____________________________________________________
>
> This message and any attachments (the 'Message') are intended solely
> for the addressees. The information contained in this Message is
> confidential. Any use of information contained in this Message not in
> accord with its purpose, any dissemination or disclosure, either whole
> or partial, is prohibited except formal approval.
>
> If you are not the addressee, you may not copy, forward, disclose or
> use any part of it. If you have received this message in error, please
> delete it and all copies from your system and notify the sender
> immediately by return message.
>
> E-mail communication cannot be guaranteed to be timely secure, error
> or virus-free.
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message ROS Didier 2019-02-28 12:47:02 RE: How to get the content of Bind variables
Previous Message ROS Didier 2019-02-28 12:21:56 How to get the content of Bind variables