On Wed, Oct 12, 2016 at 4:06 PM, vinayak <pokale_vinayak...@lab.ntt.co.jp>
wrote:
>
>
> Thank you for the patch.
>
> Test: Commands with uppercase and lowercase
> ====
> If the tag='select' then it returns the 0 rows but count is actually
> increment by 1.
>
> tag='select' vs tag='SELECT'
>
> postgres=# SET track_sql TO ON;
> SET
> postgres=# SELECT * FROM pg_stat_sql where tag='SELECT';
>   tag   | count
> --------+-------
>  SELECT |    12
> (1 row)
>
> postgres=# SELECT * FROM pg_stat_sql where tag=*'SELECT'*;
>   tag   | count
> --------+-------
> * SELECT |    13*
> (1 row)
>
> postgres=# SELECT * FROM pg_stat_sql where tag=*'select'*;
>  tag | count
> -----+-------
> *(0 rows)*
>
> postgres=# SELECT * FROM pg_stat_sql where tag=*'SELECT'*;
>   tag   | count
> --------+-------
> * SELECT |    15*
> (1 row)
>
> I think all command works same as above.
>

Thanks for checking the patch.

Yes, that's correct. Currently the CAPS letters are used as tag names
that are getting displayed whenever any SQL command is executed.
So I used the same names as entries to store the details of stats of
SQL statements.

If anyone feels the other way is better, I am fine for it.


Regards,
Hari Babu
Fujitsu Australia

Reply via email to