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

From Mattias Kregert
Subject Re: trigger interruption on "SPI_execp"
Date
Msg-id 01bb01c3341b$a56c37c0$09000a0a@kregert.se
Whole thread Raw
In response to trigger interruption on "SPI_execp"  (Benoit Baudouin <benoit.baudouin@b2i-toulouse.com>)
List pgsql-general
A select on a unique index should be very fast.
Maybe you have forgotten to run VACUUM ANALYZE...?

/Mattias


----- Original Message -----
From: "Benoit Baudouin" <benoit.baudouin@b2i-toulouse.com>
To: <pgsql-general@postgresql.org>
Sent: Monday, June 16, 2003 5:25 PM
Subject: [GENERAL] trigger interruption on "SPI_execp"


> 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
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match
>

pgsql-general by date:

Previous
From: Benoit Baudouin
Date:
Subject: trigger interruption on "SPI_execp"
Next
From: Avi Schwartz
Date:
Subject: Re: Why can't you define a table alias on an update?