Re: [JDBC] PostgreSQL JDBC and sub-select - Mailing list pgsql-hackers

From Nick Fankhauser
Subject Re: [JDBC] PostgreSQL JDBC and sub-select
Date
Msg-id NEBBLAAHGLEEPCGOBHDGCEFNGCAA.nickf@ontko.com
Whole thread Raw
In response to Re: PostgreSQL JDBC and sub-select  (snpe <snpe@snpe.co.yu>)
List pgsql-hackers
> > You could set up query logging in the backend and see what the offending
> > query is. It may still be something you did (a missing or extra
> > something somewhere).
> >
> How ?

These settings have worked for me in a similar situation: (pulled from the
admin list archives)

<snip>
My goal was to get all of the SQL statements from a JDBC front-end to be
logged as they are executed in the postgres.log file (and not in the
syslog.) Adding the following to my postgresql.conf did the job:

syslog = 0
silent_mode = off
debug_print_query = on
debug_pretty_print = on

I'm not sure if the pretty print option does anything for the SQL, but it
didn't hurt.
</snip>

The results appear on /var/log/postgresql.log using the Debian Linux
distribution. Not sure of the location in others.

-Nick


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: The database system is in recovery mode
Next
From: Rod Taylor
Date:
Subject: Re: SQL syntax (column alias)