Duplicate constraint names in 7.0.3

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Duplicate constraint names in 7.0.3
Дата
Msg-id ECEHIKNFIMMECLEBJFIGMEHFCAAA.chriskl@familyhealth.com.au
обсуждение исходный текст
Ответы Re: Duplicate constraint names in 7.0.3  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-hackers
Hi,

I have noticed that it is possible to create duplicate CHECK (haven't tried
other) constraints in 7.0.3 by doing something like this:

CREATE TABLE "test" (  "a" int4,  CHECK (a < 400),  CONSTRAINT "$1" CHECK (a > 5)
);

I was just fiddling around with trying to implement the 'DROP CONSTRAINT'
code (it's quite hard - don't wait up for me!) and it would seem to be a bad
thing that it's possible to have two constraints with the same name in a
table.

Surely there should be a UNIQUE (rcrelid, rcname) on pg_relcheck?, or at
least better checking in the CREATE TABLE code?

Chris



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Lamar Owen
Дата:
Сообщение: Re: Extrordinarily Poor Performance....
Следующее
От: "Christopher Kings-Lynne"
Дата:
Сообщение: RE: Re: New Linux xfs/reiser file systems