Adding new output parameter of pg_stat_statements to identify operation of the query.

From: jasonysli(李跃森) <jasonysli(at)tencent(dot)com>
To: "pgsql-hackers(at)postgreSQL(dot)org" <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Adding new output parameter of pg_stat_statements to identify operation of the query.
Date: 2017-02-19 09:28:53
Message-ID: 4D26F97E8B8D884898ABE03333C1CD79FA3A2BC3@EXMBX-SZMAIL008.tencent.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi PG hackers:
When using pg_stat_statements to collect running SQL of PG, we find it is hard for our program to get exact operation type of the SQL, such as SELECT, DELETE, UPDATE, INSERT, and so on.
So we modify the the source code of pg_stat_statements and add another output parameter to tell us the operation type.
Of course some application know their operation type, but for us and many public databases, doing this is hard.
The only way is to reparse the SQL, obviously it is too expensive for a monitoring or diagnosis system.
We have done the job and are willing to post a patch.

jasonysli

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-02-19 09:29:23 Re: Parallel Append implementation
Previous Message jasonysli (李跃森) 2017-02-19 09:03:25 About adding new output parameter of pg_stat_statements to identify operation of the query.