Re: Problem with non-unique constraint names - Mailing list pgsql-general

From Tom Lane
Subject Re: Problem with non-unique constraint names
Date
Msg-id 11887.1234650367@sss.pgh.pa.us
Whole thread Raw
In response to Problem with non-unique constraint names  ("Ken Winter" <ken@sunward.org>)
List pgsql-general
"Ken Winter" <ken@sunward.org> writes:
> Since constraint name uniqueness is a SQL standard, I was surprised that
> PostgreSQL doesn't enforce it.  I found one thread (from 2002) in the
> archive that discusses this, but the thread ended inconclusively.

I think our position is pretty clear: we aren't going to enforce it.

The PG code does avoid choosing default constraint names that
duplicate an existing constraint.  So if you have this situation it's
presumably because you explicitly named two constraints the same.
Solution, of course, is don't do that if you need them to not be the
same.

            regards, tom lane

pgsql-general by date:

Previous
From: Serge Fonville
Date:
Subject: Re: pg_hba reload
Next
From: John R Pierce
Date:
Subject: Re: pg_hba reload