From: zkn <zkn@abv.bg>
To: pgsql-sql@postgresql.org
Subject: Problem with batch insert
Date: Thu, 18 Feb 2010 14:53:07 +0200
Message-ID: <1077F011-859B-4AE5-AE95-65B45F775DE6@abv.bg> (raw)
Hi,
First I'm sorry if this message shouldn't be posted in this mailing list but I wasn't sure if it should be here or in jdbc mailing list.
I have a weird problem with batch insert. It works fine on my development machine but when I upload to the server it fails. Here is the log:
DEBUG [http-8443-2] - {conn-100123} Preparing Statement: insert into target_filters_sections (filter_id, section_id) values (?, ?) , (?, ?)
DEBUG [http-8443-2] - {pstm-100124} Executing Statement: insert into target_filters_sections (filter_id, section_id) values (?, ?) , (?, ?)
DEBUG [http-8443-2] - {pstm-100124} Parameters: [23, 229, 23, 141]
DEBUG [http-8443-2] - {pstm-100124} Types: [java.lang.Integer, java.lang.Integer, java.lang.Integer, java.lang.Integer]
DEBUG [http-8443-2] - Unable to translate SQLException with SQL state '42601', error code '0, will now try the fallback translator
DEBUG [http-8443-2] - Returning JDBC Connection to DataSource
org.springframework.jdbc.BadSqlGrammarException: SqlMapClient operation; bad SQL grammar []; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred while applying a parameter map.
--- Check the addSectionsToTargetsFilter-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: org.postgresql.util.PSQLException: ERROR: syntax error at or near ","
Position: 113
And here is the log for the same operation on my development machine:
DEBUG [http-8080-1] - {conn-100006} Preparing Statement: insert into target_filters_sections (filter_id, section_id) values (?, ?) , (?, ?) , (?, ?)
DEBUG [http-8080-1] - {pstm-100007} Executing Statement: insert into target_filters_sections (filter_id, section_id) values (?, ?) , (?, ?) , (?, ?)
DEBUG [http-8080-1] - {pstm-100007} Parameters: [28, 1603, 28, 1605, 28, 1604]
DEBUG [http-8080-1] - {pstm-100007} Types: [java.lang.Integer, java.lang.Integer, java.lang.Integer, java.lang.Integer, java.lang.Integer, java.lang.Integer]
DEBUG [http-8080-1] - Returning JDBC Connection to DataSource
Postgre version on the server 8.1 on development 8.3
Any clues?
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: zkn@abv.bg
Subject: Re: Problem with batch insert
In-Reply-To: <1077F011-859B-4AE5-AE95-65B45F775DE6@abv.bg>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox