Re: pg_stat_statements : how to catch non successfully finished statements ?

From: legrand legrand <legrand_legrand(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_stat_statements : how to catch non successfully finished statements ?
Date: 2018-04-28 20:17:36
Message-ID: 1524946656214-0.post@n3.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

OK I see ...

This hook should be used only for ERROR (no WARNING nor NOTICE ...)
and the only real interesting information is
ErrorData -> internalquery; /* text of internally-generated query */

This doesn't permit to (re)build the link to queryid
(that is based on parse tree, but not available here)

So the only solution is to had queryId to ErrorData in this hook
or create a new hook fired on ERROR and containing queryId ?

Regards
PAscal

--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2018-04-28 20:58:53 Re: pg_stat_statements : how to catch non successfully finished statements ?
Previous Message g@luxsci.net 2018-04-28 20:07:42 Re: Rationale for aversion to the central database?