From: | Hannu Krosing <hannu(at)tm(dot)ee> |
---|---|
To: | Rod Taylor <rbt(at)rbt(dot)ca> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Antti Haapala <antti(dot)haapala(at)iki(dot)fi>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Multicolumn foreign keys need useless unique indices? |
Date: | 2002-09-13 16:59:49 |
Message-ID: | 1031936389.13531.34.camel@taru.tm.ee |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, 2002-09-13 at 17:42, Rod Taylor wrote:
>
> > hannu=# update t set i=i+1;
> > ERROR: Cannot insert a duplicate key into unique index t_i_key
>
> A possibility may be to reverse the sequential scan order for the simple
> cases, but anything any more complex and the check should be deferred
> till end of statement, rather than checking immediately.
Or we could keep a 'conflict list' that would be dynamically added to
and deleted from during the statement and the statement would be aborted
if
1) there were any entries in the list at the end of statement
or
2) if the list overflowed at some predefined limit (say 1000 or 100.000
conflicts) during the statement.
in our simple case we would have at most 1 conflict in the list at any
time.
--------------
Hannu
From | Date | Subject | |
---|---|---|---|
Next Message | Laurette Cisneros | 2002-09-13 17:09:48 | time default |
Previous Message | Joe Conway | 2002-09-13 16:46:08 | Re: TOAST docs |