Re: Two constraints with the same name not always allowed

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
Cc: André Hänsel <andre(at)webkr(dot)de>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Two constraints with the same name not always allowed
Date: 2018-09-06 21:53:47
Message-ID: 4a963af1-b199-ceae-6e55-804535bbf09b@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 02/09/2018 19:00, Tom Lane wrote:
> This also points up the lack of a suitable unique index on pg_constraint.
> It's sort of difficult to figure out what that should look like given that
> pg_constraint contains two quasi-independent collections of constraints,
> but maybe UNIQUE(conrelid,contypid,conname) would serve given the
> reasonable assumption that exactly one of conrelid and contypid is zero.

Sketches for assertions set both conrelid and contypid to zero. I think
the unique constraint would have to include connamespace to support that
properly.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2018-09-06 21:58:36 Re: BUG #15367: Crash in pg_fe_scram_free when using foreign tables
Previous Message Peter Eisentraut 2018-09-06 21:49:56 Re: BUG #15358: PostgreSQL fails to build on 10.14 when Perl is enabled.