Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h6yWQ-0002cH-6a for pgsql-bugs@arkaria.postgresql.org; Thu, 21 Mar 2019 14:18:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h6yWO-0007qS-Qp for pgsql-bugs@arkaria.postgresql.org; Thu, 21 Mar 2019 14:18:16 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h6yWO-0007qK-H8 for pgsql-bugs@lists.postgresql.org; Thu, 21 Mar 2019 14:18:16 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h6yWL-0007Vo-VU for pgsql-bugs@lists.postgresql.org; Thu, 21 Mar 2019 14:18:15 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x2LEIANW010529; Thu, 21 Mar 2019 10:18:12 -0400 From: Tom Lane To: thomas@palan.at cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15710: ADD COLUMN IF NOT EXISTS adds constraint anyways In-reply-to: <15710-f52bad04543be4cb@postgresql.org> References: <15710-f52bad04543be4cb@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Thu, 21 Mar 2019 08:41:53 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <10527.1553177890.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 21 Mar 2019 10:18:10 -0400 Message-ID: <10528.1553177890@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Bug reporting form writes: > If I want to add a column to a table which and the column may or may not > already exist, the specified column constraint like UNIQUE is added ever= y > time the command is issued, regardless if the column gets added or not. Yeah, this is the same thing previously reported at https://www.postgresql.org/message-id/flat/152509815280.19803.161181944522= 13577808%40wrigleys.postgresql.org We haven't got further than sketching a design for a fix :-( regards, tom lane