If you attempted the inserts within a single transaction and any of them fail, they will all fail. The server will automatically undo any and all changes made by the transaction, and any further steps in the transaction will simply result in the error message you are getting. You will not be able to (successfully) issue any further database commands until you end the transaction and start a new one.

On Dec 11, 2004, at 2:29 PM, Bruno Wolff III wrote:

On Wed, Dec 08, 2004 at 14:50:04 +0100,
  Julian Legeny <[EMAIL PROTECTED]> 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.


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster



-----------------------------------------------------------
Frank D. Engel, Jr.  <[EMAIL PROTECTED]>

$ ln -s /usr/share/kjvbible /usr/manual
$ true | cat /usr/manual | grep "John 3:16"
John 3:16 For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.
$




___________________________________________________________
$0 Web Hosting with up to 120MB web space, 1000 MB Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Signup at www.doteasy.com


---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply via email to