Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 3E4351337C26 for ; Wed, 16 Mar 2011 07:44:06 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 44079-06 for ; Wed, 16 Mar 2011 10:43:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-bw0-f46.google.com (mail-bw0-f46.google.com [209.85.214.46]) by mail.postgresql.org (Postfix) with ESMTP id A3CEF1337BFE for ; Wed, 16 Mar 2011 07:43:55 -0300 (ADT) Received: by bwz15 with SMTP id 15so1377911bwz.19 for ; Wed, 16 Mar 2011 03:43:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type; bh=RdM6WMQN5Cyc7HOydlrjh4HTLqtoSs/al4jpuoq+RIg=; b=w4rTyzSox93M0v8uQI6G6vhFMXMAw6msYhjBrc2Gym1BX5uGFuQ92LjFEu96O1Ax8+ Q7xcmgBB7HcD0z0XzxXsMNjLsLPuw266VtS6H73FLSCJEaccP6ftff94xoTBcwHt6zKj yv6B/x6KTspTjKILOy6bhZrcq73EbvCV7AAxI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; b=SyzIWj4nZrLthW+6ph5C+2W2b/Kak4LkKqB7F6zmT+d82IBs61i01j9g2S+2hFVU2b 3A4MFzR3KPi65m3BzrcyRTcFTjxYBHNcw5gslyRaVtAmT5JymhJ2dF1h6mdHZ35beEtw G9m8JkWZuhpVYHazqA4iXWuYZpItPqb/4I1lc= Received: by 10.204.45.81 with SMTP id d17mr551469bkf.107.1300272233772; Wed, 16 Mar 2011 03:43:53 -0700 (PDT) Received: from [10.1.1.57] (skuns.zoral.com.ua [91.193.166.194]) by mx.google.com with ESMTPS id b7sm512095bkb.18.2011.03.16.03.43.51 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 16 Mar 2011 03:43:52 -0700 (PDT) Message-ID: <4D80946E.3060200@gmail.com> Date: Wed, 16 Mar 2011 12:43:58 +0200 From: Vitalii Tymchyshyn User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8 MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Re: Problem with executeBatch and "A result was returned when none was expected" References: In-Reply-To: Content-Type: multipart/alternative; boundary="------------090008040704070407000801" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.035 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_ENVFROM_END_DIGIT=1.553, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201103/20 X-Sequence-Number: 21575 This is a multi-part message in MIME format. --------------090008040704070407000801 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 sql, String [] columnNames)". Best regards, Vitalii Tymchyshyn --------------090008040704070407000801 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 sql,  String[] columnNames)".

Best regards, Vitalii Tymchyshyn --------------090008040704070407000801--