Re: CommandStatus from insert returning when using a portal. - Mailing list pgsql-hackers

From chap@anastigmatix.net
Subject Re: CommandStatus from insert returning when using a portal.
Date
Msg-id 03f6ad5abdf282cc5d696030358e9b80@anastigmatix.net
Whole thread Raw
In response to Re: CommandStatus from insert returning when using a portal.  (Dave Cramer <davecramer@gmail.com>)
Responses Re: CommandStatus from insert returning when using a portal.
List pgsql-hackers
Dave Cramer <davecramer@gmail.com> writes:
> Obviously I am biased by the JDBC API which would like to have
> PreparedStatement.execute() return the number of rows inserted
> without having to wait to read all of the rows returned

Huh ... just how *is* PreparedStatement.execute() supposed
to behave when the statement is an INSERT RETURNING?

execute() -> true
getResultSet() -> the rows
getMoreResults() -> false
getUpdateCount() -> number inserted?

It seems that would fit the portal's behavior easily enough.

Or is the JDBC spec insisting on some other order?

Regards,
-Chap



pgsql-hackers by date:

Previous
From: "Tristan Partin"
Date:
Subject: Re: Meson build updates
Next
From: Vik Fearing
Date:
Subject: Re: MERGE ... RETURNING