Re: Problem with executeBatch and "A result was returned when none was expected"

From: Vitalii Tymchyshyn <tivv00(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Problem with executeBatch and "A result was returned when none was expected"
Date: 2011-03-16 10:43:58
Message-ID: 4D80946E.3060200@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

16.03.11 12:40, Dave Cramer ???????(??):
> So looking at the code if you add RETURN_GENERATED_KEYS to the
> statement it returns all of the columns. That's rather ugly. Is there
> a way to determine just the generated keys ?
AFAIR it was a long discussion on what is "generated". E.g. is
calculated default value (CURRENT TIMESTAMP) generated? Constant default
value? So, the driver now either returns all or you can pass columns you
require by yourself with "boolean *execute*(String
<http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html> sql,
String
<http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html>[] columnNames)".

Best regards, Vitalii Tymchyshyn

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2011-03-16 10:57:58 Re: Problem with executeBatch and "A result was returned when none was expected"
Previous Message Dave Cramer 2011-03-16 10:40:22 Re: Problem with executeBatch and "A result was returned when none was expected"