Re: JDBC keygen select - Mailing list pgsql-jdbc

From Markus Schaber
Subject Re: JDBC keygen select
Date
Msg-id 43E31705.7060209@logix-tt.com
Whole thread Raw
In response to Re: JDBC keygen select  (Dave Cramer <pg@fastcrypt.com>)
List pgsql-jdbc
Hi, Dave,

Dave Cramer wrote:
> Mike,
>
> Apparently there is a patch floating around that will implement   INSERT
> ... RETURNING
>
> So I'd say that it is more likely that number 1 gets implemented as  it
> would seem to me easier to do if we know exactly which column to  return.

I'd also prefer that second way, as it additionally allows returing more
than one column (as a resultset), especially together with the multi-row
insert extension that's also discussed.

>> ps = itsDBConnection.prepareStatement(sql, {"myKeyColumn"});

ps = itsDBConnection.prepareStatement(sql+" RETURNING myKeyColumn");

HTH,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: JDBC keygen select
Next
From: Paolo Predonzani
Date:
Subject: escapeQuotes causes faults in DatabaseMataData