select*from some_table where details::varcharlike'ABC%';
Java中添加转义字符:
Java
StringstrSql="select * from some_table where details\\:\\:varchar like 'ABC%'";
长事务的查询与中断
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
# 查询 SELECT pid, datname AS db, query_start AS start, now() - query_start AS lap, query FROM pg_stat_activity WHERE state <> 'idle' and query not like '%pg_stat_activity%' and (now() - query_start) > interval '10 seconds';