From: | "Mattias Kregert" <mattias(at)kregert(dot)se> |
---|---|
To: | <benoit(dot)baudouin(at)b2i-toulouse(dot)com> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: trigger interruption on "SPI_execp" |
Date: | 2003-06-16 15:26:23 |
Message-ID: | 01bb01c3341b$a56c37c0$09000a0a@kregert.se |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | 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(dot)baudouin(at)b2i-toulouse(dot)com>
To: <pgsql-general(at)postgresql(dot)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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Avi Schwartz | 2003-06-16 16:32:51 | Re: Why can't you define a table alias on an update? |
Previous Message | Benoit Baudouin | 2003-06-16 15:25:22 | trigger interruption on "SPI_execp" |