Re: Problem with non-unique constraint names

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Ken Winter" <ken(at)sunward(dot)org>
Cc: "PostgreSQL pg-general List" <pgsql-general(at)postgresql(dot)org>, kwinter(at)dhat(dot)org
Subject: Re: Problem with non-unique constraint names
Date: 2009-02-14 22:26:07
Message-ID: 11887.1234650367@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Ken Winter" <ken(at)sunward(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ken Winter 2009-02-14 22:36:11 Array in nested query
Previous Message John R Pierce 2009-02-14 22:25:46 Re: pg_hba reload