Re: Insert do not work in my case - Mailing list pgsql-general

From Richard Huxton
Subject Re: Insert do not work in my case
Date
Msg-id 41C1541E.5020907@archonet.com
Whole thread Raw
In response to Re: Insert do not work in my case  (Mickael Remond <mickael.remond@erlang-fr.org>)
List pgsql-general
Mickael Remond wrote:
> Chris Smith wrote:
>
>> The easiest way to start is to turn on query logs for your server and
>> see if it gets that far.
>
>
> When turning on query logs in Postgresql, I only get the content of the
> prepared statement without the parameters (question mark). I there a way
> to expand what is executed by the server ?

Are you sure this isn't being logged when the query is prepared, rather
than when it is executed?

> Programmatically, I am printing out the prepared statement and the
> parameters seperatly. I already tried to do the insert manually and it
> works.
>
> However, I do not see what could be the problem. PostgreSQL is not
> showing any error. I thought it could be a problem with prepared
> statement and the jdbc driver or it could have something to do with a
> change in the postgreSQL default parameters.

If the logs are not showing the INSERT occurring, nor an error, then I
would guess the INSERT is not happening at all. Look at the exact point
in your code where the prepared statement gets executed, for some reason
  it doesn't appear to be called. Put a "SELECT 1;" either side of the
execute and just check.

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Ian Barwick
Date:
Subject: Re: pl/pgsql oddity
Next
From: Michael Ben-Nes
Date:
Subject: online backup in critical systems