From nicksieger at gmail.com Mon Nov 2 15:19:18 2009 From: nicksieger at gmail.com (Nick Sieger) Date: Mon, 2 Nov 2009 14:19:18 -0600 Subject: [Jruby-extras-devel] jdbc postgres INSERT RETURNING In-Reply-To: References: Message-ID: On Fri, Oct 30, 2009 at 5:39 PM, Monroe, Grant wrote: > Running execute with the postgres jdbc driver like so > > ?def self.up > ? ?execute('INSERT INTO foo (a,b) VALUES (1,2) RETURNING (id)') > ?end > > results in the following error > > ? ?ActiveRecord::ActiveRecordError: A result was returned when none > was expected.: INSERT INTO foo (a,b) VALUES (1,2) RETURNING (id) > > Any suggestions? This looks like a PostgreSQL/JDBC issue. Which version of ar-jdbc are you using? It looks like some code in #insert has been disabled that is supposed to deal with this issue. I'll have to look into it for the next release. Would you mind filing a bug [1] with further details? Thanks, /Nick [1]: http://kenai.com/jira/browse/ACTIVERECORD_JDBC