title: Is there any way to trace and debug a query in Postgresql?
body: <p>Is there any way/tool to trace and debug a query in PostgreSQL 9.3.18?
  I'm a SQL programmer and sometimes I need to trace and debug my queries and see the values of different fields at execution time. I've Googled this but didn't get any relevant result.</p>
  
  <p>Any idea would be appreciated</p>