| From: | Bruno Wolff III <bruno(at)wolff(dot)to> |
|---|---|
| To: | Juleni <julo(at)opensubsystems(dot)org> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Select after insert to the unique column |
| Date: | 2004-12-11 19:29:13 |
| Message-ID: | 20041211192913.GA2668@wolff.to |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Wed, Dec 08, 2004 at 14:50:04 +0100,
Julian Legeny <legeny(at)softhome(dot)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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruno Wolff III | 2004-12-11 19:32:40 | Re: question: how to preload data and excute table creation scripts |
| Previous Message | David Fetter | 2004-12-11 19:22:52 | Re: What's faster |