Re: Select after insert to the unique column

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Select after insert to the unique column
Дата
Msg-id 20041211192913.GA2668@wolff.to
обсуждение исходный текст
Ответ на Select after insert to the unique column  (Julian Legeny <legeny@softhome.net>)
Ответы Re: Select after insert to the unique column  ("Frank D. Engel, Jr." <fde101@fjrhome.net>)
Список pgsql-general
On Wed, Dec 08, 2004 at 14:50:04 +0100,
  Julian Legeny <legeny@softhome.net> wrote:
> Hello,
>
>    Then I want to process command
>       select count(*) from UNIQUE_COLUMN_TEST
>    that I want to know how many records was already inserted before id
>    faied.
>
>    But when I try to process that SELECT COUNT(*), there is error
>    occured again:
>
>    org.postgresql.util.PSQLException:
>    ERROR: current transaction is aborted, commands ignored until end of transaction block
>
>    How can I solve this?

Depending on what you really want to do, you could do each insert in its
own transaction.

If you don't want any of the inserts to succeed if there are problems, then
you should do the counting in the application doing the inserts.

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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: question: how to preload data and excute table creation scripts
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: question: how to preload data and excute table creation scripts