Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYWk4-0006Td-GP for pgsql-general@arkaria.postgresql.org; Fri, 30 Oct 2020 15:55:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kYWk3-00069n-1K for pgsql-general@arkaria.postgresql.org; Fri, 30 Oct 2020 15:55:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYWk2-00069g-Px for pgsql-general@lists.postgresql.org; Fri, 30 Oct 2020 15:55:02 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYWk0-0001zB-GP for pgsql-general@lists.postgresql.org; Fri, 30 Oct 2020 15:55:02 +0000 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 21E7B2628FA for ; Fri, 30 Oct 2020 08:54:57 -0700 (PDT) Date: Fri, 30 Oct 2020 08:54:57 -0700 (PDT) From: Rich Shepard To: pgsql-general@lists.postgresql.org Subject: Re: Drop column constraint [FIXED] In-Reply-To: <6710083f-90d2-d111-45dd-e6f4162f825e@aklaver.com> Message-ID: References: <6710083f-90d2-d111-45dd-e6f4162f825e@aklaver.com> User-Agent: Alpine 2.20 (LNX 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, 30 Oct 2020, Adrian Klaver wrote: > It should be: > alter table locations drop constraint 'constraint_name'; Adrian, Yes, I forgot to quote the constraint_name, And, I used the DDL name 'unique' rather than the internal name "locations_loc_nbr_key". Using the latter, and adding 'cascade' (because the dependent table is empty) did the trick. Thank you, Rich