Re: ERROR: UNIQUE constraint ... not found?
От
Nigel J. Andrews
Тема
Re: ERROR: UNIQUE constraint ... not found?
Дата
Msg-id
Pine.LNX.4.21.0304022352360.2573-100000@ponder.fairway2k.co.uk
Ответ на
Список
Дерево обсуждения
ERROR: UNIQUE constraint ... not found? "Ed L." <pgsql@bluepolka.net>
Re: ERROR: UNIQUE constraint ... not found? "Ed L." <pgsql@bluepolka.net>
Re: ERROR: UNIQUE constraint ... not found? Stephan Szabo <sszabo@megazone23.bigpanda.com>
Re: ERROR: UNIQUE constraint ... not found? Dennis Gearon <gearond@cvc.net>
Re: ERROR: UNIQUE constraint ... not found? "Nigel J. Andrews" <nandrews@investsystems.co.uk>
Re: ERROR: UNIQUE constraint ... not found? Dennis Gearon <gearond@cvc.net>
Re: ERROR: UNIQUE constraint ... not found? "Nigel J. Andrews" <nandrews@investsystems.co.uk>
On Wed, 2 Apr 2003, Ed L. wrote: > > psql:test.sql:12: ERROR: UNIQUE constraint matching given keys for > > referenced table "person" not found > > Ah. I was wondering why this didn't work anymore when it worked in 7.1. I > guess the change in SERIAL semantics where the unique index is no longer > created is what causes the problem. If I used PRIMARY KEY or create a > unique index manually on person.id, it works fine. It seems odd that one > cannot have a foreign key to a non-indexed column in another table. > Well, I suppose a trigger on insert and update could be used to impose the unique constraint, which is what the foriegn key needs, but then every check and use wouldn't have an index it could potentially use for the lookup. -- Nigel J. Andrews
В списке pgsql-general по дате отправления