I am using JVisualVm's jdbc profiler to monitor my local java program.
It would capture something like this:
select * from reservation v where v.name like '%'%'
If you try to run this in pgadmin, it would throw error:
For PgAdmin to run it, we have to escape the single quote in the string:
select * from reservation where name like '%''%'
Basically we need to change ' to '' so that the string the sql does not get cut off into 2 pieces.
My question is: is visual vm's jdbc profiler able to capture the final sql statement that gets executed by the DB?