Re: Abort state on duplicated PKey in transactions

Поиск
Список
Период
Сортировка
От Haroldo Stenger
Тема Re: Abort state on duplicated PKey in transactions
Дата
Msg-id 3B9A4B49.37E2890A@adinet.com.uy
обсуждение исходный текст
Ответ на Abort state on duplicated PKey in transactions  (Haroldo Stenger <hstenger@adinet.com.uy>)
Список pgsql-general
Martijn van Oosterhout wrote:
> The usual way is to generate your primarys keys from a sequence. Then you
> never get duplicate values and so the inserts never fail.
>
> This may not apply in your situation...


Both are true, thanks. We need a layer that doesn't complain when a
failing insert is issued. In DB apps, many times a procedure, tries to
insert a record, and if it already exists, then it updates the record.
But since that pair of commands, may be late in a bigger transaction, a
failing insert shoudn't abort the transaction. So, I want to find a way
of avoiding a failing insert. Any other ideas?

This is important, since in a couple of weeks, we will be announcing
GeneXus support for PostgreSQL, and a lot of exitement is being
generated out of this. That announcement will be done in a commercial
and entepreneurial international event, which is fresh water for us
PostgreSQL enthusiasts.

Regards,
Haroldo.

В списке pgsql-general по дате отправления:

Предыдущее
От: Vince Vielhaber
Дата:
Сообщение: Re: Idea: jobs.postgresql.org
Следующее
От: Justin Clift
Дата:
Сообщение: Re: Idea: jobs.postgresql.org