Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fwVoS-0007x8-Oc for pgsql-bugs@arkaria.postgresql.org; Sun, 02 Sep 2018 17:05:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fwVoR-00029B-35 for pgsql-bugs@arkaria.postgresql.org; Sun, 02 Sep 2018 17:05:23 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fwVoQ-00028h-PK for pgsql-bugs@lists.postgresql.org; Sun, 02 Sep 2018 17:05:22 +0000 Received: from mail-qk1-x744.google.com ([2607:f8b0:4864:20::744]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fwVoJ-0003dO-4j for pgsql-bugs@postgresql.org; Sun, 02 Sep 2018 17:05:21 +0000 Received: by mail-qk1-x744.google.com with SMTP id d15-v6so4384072qkc.1 for ; Sun, 02 Sep 2018 10:05:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=qdpRaBHzGs9LkAYfjTVAC+0BRICIL/9cnZdch0ajAgo=; b=JCRRiutzpe2Bl9HwP2iOZ2KMu/wuvZLGOB4Pjno/BafGwtMmgHvIcqSUB4/pUxmmek OUk+owHWfeXN1ds0xDNQjTb2HuH6BzlrXo19antUWAF7MgurNMcW7G9V3dh2eC9OC9A6 7rqD7mkrc4FYZ3HGDqWHFAWOCXsIs893a7eWA4woLUqNPRG+fL+SlkRPx3/MRnSgzELO o1eZIy2NRsRbk7WA8DWwCtZap00ZYZbjyKnpGvoYhSUbCMo3Wz1gFWX1WyYp3Bs8nPQe sdfOR/AHfBF7CyEL9F3sHRbFXCXjK1WyRTPanVaNVdDW+8HGYdY9tOsSHzJkCZvRxA/K /6Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=qdpRaBHzGs9LkAYfjTVAC+0BRICIL/9cnZdch0ajAgo=; b=MrwxYi0AYFo5aXGpTIZK5yarWh3ayWYtj6kSu4Bt64QI0Xqb5BaSsJah1Dwy6MtPGi llYKCOsrRWlFmxQH2hQFzt5kPF9UuAFT88kHVQKif0K+k9uhQWsEmWVzYDPtKeTmH1GR I1YYjWaa49fE6hnnQQoutZr2St+cQKDeX82hqowNKsw9lj6Qi5hgBQqCrfWIBau7qKoB 3JnMSnywre24qpPIoGXoB8ol2LPd4ZyMWFrK16KFyI/BFiWrudelhfNZ2CuDekHW3uoM v6de9n0SmMG9RMeIG/sEgca+Sjw7YrEL5jispIrPQicyI5jGcejxP4w8VlLgQq9IgxAU Nncw== X-Gm-Message-State: APzg51ASHaoTg0hvjGQTRcq+4wvnEY9s+104cXv7Y6EWOI9mAQCbH/me SYIuAlLWQ5pQMfNUNCYJz9erLmlt9/5p8NR4nd2wyRVTqvaGw5vMoTbjJ+CW6F1uPvtY8zB2oW8 QK9kGiceDcw+NCYQiDdHtxSr5fIuLR6jfF6xYd8H9tGZ6Rc9lc27Gp5pq2h8J3q9veV356xIm3W raIA== X-Google-Smtp-Source: ANB0VdbBMwDMw0InIJtyMI0TonluD4sH3G7/8zCGNeQZp3smBGo+sn25BjyIIa25yCyK9tsedZr+yg== X-Received: by 2002:a37:60c7:: with SMTP id u190-v6mr11358502qkb.222.1535907913805; Sun, 02 Sep 2018 10:05:13 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([201.186.81.219]) by smtp.gmail.com with ESMTPSA id k15-v6sm11092652qtf.95.2018.09.02.10.05.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 02 Sep 2018 10:05:13 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id A8B1047C; Sun, 2 Sep 2018 14:05:11 -0300 (-03) Date: Sun, 2 Sep 2018 14:05:11 -0300 From: Alvaro Herrera To: Tom Lane Cc: Andrew Gierth , =?iso-8859-1?Q?Andr=E9_H=E4nsel?= , pgsql-bugs@postgresql.org Subject: Re: Two constraints with the same name not always allowed Message-ID: <20180902170511.ibjquzhymvnfvkqs@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <10110.1535907645@sss.pgh.pa.us> User-Agent: NeoMutt/20170306-137-4415bd-dirty (1.8.0) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-Sep-02, 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. Hmm ... c.f. 7eca575d1c28. Maybe we should split them out? Are there reasons to have them together at all? -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services