Re: Insert do not work in my case

From: Richard Huxton <dev(at)archonet(dot)com>
To: Mickael Remond <mickael(dot)remond(at)erlang-fr(dot)org>
Cc: Chris Smith <chris(at)interspire(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Insert do not work in my case
Date: 2004-12-16 09:23:42
Message-ID: 41C1541E.5020907@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2004-12-16 09:35:27 Re: pl/pgsql oddity
Previous Message Ian Barwick 2004-12-16 09:23:40 Re: pl/pgsql oddity