Re: CommandStatus from insert returning when using a portal.

Поиск
Список
Период
Сортировка
От chap@anastigmatix.net
Тема Re: CommandStatus from insert returning when using a portal.
Дата
Msg-id 03f6ad5abdf282cc5d696030358e9b80@anastigmatix.net
обсуждение исходный текст
Ответ на Re: CommandStatus from insert returning when using a portal.  (Dave Cramer <davecramer@gmail.com>)
Ответы Re: CommandStatus from insert returning when using a portal.  (Dave Cramer <davecramer@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: "Tristan Partin"
Дата:
Сообщение: Re: Meson build updates
Следующее
От: Vik Fearing
Дата:
Сообщение: Re: MERGE ... RETURNING