trigger interruption on "SPI_execp" - Mailing list pgsql-general

From Benoit Baudouin
Subject trigger interruption on "SPI_execp"
Date
Msg-id 3EEDE162.3060005@b2i-toulouse.com
Whole thread Raw
List pgsql-general
hi,

I table with primary key and in trigger try to insert into this table data
 wich violate constrain (not uniq). When ectually executing SPI_execp I got
 a message "ERROR: cannot insert a duplicate key into a unique index" and
 trigger executing is aborted.
Is there some way to insert uniq data into
table without first cheking using SELECT. Because this table contain >1M
records and SELECT on it is very slow.

best regards,

      Benoît Baudouin

       B2i Toulouse
1 av. de l'Europe 31400 Toulouse
tel 0561003080 fax 0561003085



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Why can't you define a table alias on an update?
Next
From: "Mattias Kregert"
Date:
Subject: Re: trigger interruption on "SPI_execp"