Re: [HACKERS] Adding new output parameter of pg_stat_statements to identify operation of the query.

2017-02-21 Thread Jim Nasby
On 2/19/17 10:02 PM, Tom Lane wrote: Jim Nasby writes: Something that needs to be considered with doing this in pg_stat_statement is that a query that's reported there can contain multiple SQL statements. I don't remember offhand if all statements get parsed as a

Re: [HACKERS] Adding new output parameter of pg_stat_statements to identify operation of the query.

2017-02-19 Thread Tom Lane
Jim Nasby writes: > Something that needs to be considered with doing this in > pg_stat_statement is that a query that's reported there can contain > multiple SQL statements. I don't remember offhand if all statements get > parsed as a whole before anything else

Re: [HACKERS] Adding new output parameter of pg_stat_statements to identify operation of the query.

2017-02-19 Thread Jim Nasby
On 2/19/17 6:34 PM, Tsunakawa, Takayuki wrote: We have done the job and are willing to post a patch. I sent one through my work mail, but it seems that my mail didn't reach the maillist, so I try again by using my personal mail account. A view for counting the number of executions per operation

Re: [HACKERS] Adding new output parameter of pg_stat_statements to identify operation of the query.

2017-02-19 Thread Tsunakawa, Takayuki
From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of > husttrip...@vip.sina.com > 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,

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

2017-02-19 Thread husttripper
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

Re: [HACKERS] Adding new output parameter of pg_stat_statements to identify operation of the query.

2017-02-19 Thread Robert Haas
On Sun, Feb 19, 2017 at 2:58 PM, jasonysli(李跃森) wrote: > 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

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

2017-02-19 Thread 李跃森
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

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

2017-02-19 Thread 李跃森
Hi 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