<!-- 
RSS generated by JIRA (4.4#649-r158309) at Mon May 20 06:54:38 CDT 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://dev.clojure.org/jira/si/jira.issueviews:issue-xml/JDBC-28/JDBC-28.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Clojure JIRA</title>
    <link>http://dev.clojure.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>4.4</version>
        <build-number>649</build-number>
        <build-date>25-07-2011</build-date>
    </build-info>

<item>
            <title>[JDBC-28] prepared-statement* behaves different on OpenJDK 1.6 and OS X Java 1.6.</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-28</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;I&apos;m using the Clojure library Korma to generate SQL for Postgres, which depends on clojure.java.jdbc. Recently I added a custom &apos;upsert&apos; query. Using it on normal java 1.6 is fine, but on openJDK it breaks due to the use of &apos;java.sql.Statement/RETURN_GENERATED_KEYS&apos;. This makes the Postgres driver add a seemingly random &quot;RETURNING *&quot; at the end of the query.&lt;/p&gt;

&lt;p&gt;On normal Java 1.6 java.sql.Statement/RETURN_GENERATED_KEYS doesn&apos;t exist and then a exception is caught and everything works as expected. Sounds like the world up side down, but I&apos;m probably missing the rational behind this.&lt;/p&gt;

&lt;p&gt;The line that causes the weird behavior is here: &lt;a href=&quot;https://github.com/clojure/java.jdbc/blob/master/src/main/clojure/clojure/java/jdbc/internal.clj#L315&quot;&gt;https://github.com/clojure/java.jdbc/blob/master/src/main/clojure/clojure/java/jdbc/internal.clj#L315&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The code that showcases the &apos;bug&apos; is here:&lt;br/&gt;
&lt;a href=&quot;https://gist.github.com/2e8a3d55d80707ce79e0&quot;&gt;https://gist.github.com/2e8a3d55d80707ce79e0&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(Sorry for the monkey patching in the gist, if there is a better way I would love to hear it)&lt;/p&gt;

&lt;p&gt;I guess a naive patch would be to remove the java.sql.Statement/RETURN_GENERATED_KEYS line, but there must be a reason for its existence I assume.&lt;/p&gt;</description>
                <environment>Ubuntu &lt;br/&gt;
OpenJDK:&lt;br/&gt;
java version &amp;quot;1.6.0_22&amp;quot;&lt;br/&gt;
OpenJDK Runtime Environment (IcedTea6 1.10.6) (6b22-1.10.6-0ubuntu1)&lt;br/&gt;
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)&lt;br/&gt;
&lt;br/&gt;
OS X Java&lt;br/&gt;
java version &amp;quot;1.6.0_29&amp;quot;&lt;br/&gt;
Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-10M3527)&lt;br/&gt;
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)&lt;br/&gt;
&lt;br/&gt;
Relevant clojure libraries&lt;br/&gt;
&amp;nbsp;&amp;nbsp;[org.clojure/clojure &amp;quot;1.3.0&amp;quot;]&lt;br/&gt;
&amp;nbsp;&amp;nbsp;[korma &amp;quot;0.3.0-beta9&amp;quot;]&lt;br/&gt;
&amp;nbsp;&amp;nbsp;[org.clojure/java.jdbc &amp;quot;0.1.3&amp;quot;]&lt;br/&gt;
&amp;nbsp;&amp;nbsp;[postgresql/postgresql &amp;quot;9.1-901.jdbc3&amp;quot;]&lt;br/&gt;
</environment>
            <key id="15308">JDBC-28</key>
            <summary>prepared-statement* behaves different on OpenJDK 1.6 and OS X Java 1.6.</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="2">Declined</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="jeroen">Jeroen van Dijk</reporter>
                        <labels>
                    </labels>
                <created>Fri, 30 Mar 2012 03:20:02 -0500</created>
                <updated>Sat, 31 Mar 2012 01:30:25 -0500</updated>
                    <resolved>Sat, 31 Mar 2012 01:30:25 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="28065" author="seancorfield" created="Sat, 31 Mar 2012 01:30:25 -0500"  >&lt;p&gt;RETURN_GENERATED_KEYS is required for inserts to return the generated keys. Since this works on Sun&apos;s Java 6 and with all intended databases, and is per spec, it is not going away.&lt;/p&gt;

&lt;p&gt;Right now OpenJDK / PostgreSQL is not a supported combination, sorry.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>
</channel>
</rss>