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 1kYWmo-0006Yt-36 for pgsql-general@arkaria.postgresql.org; Fri, 30 Oct 2020 15:57:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kYWmn-000329-24 for pgsql-general@arkaria.postgresql.org; Fri, 30 Oct 2020 15:57:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYWmm-0002yA-QX for pgsql-general@lists.postgresql.org; Fri, 30 Oct 2020 15:57:52 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYWmk-000340-MV for pgsql-general@lists.postgresql.org; Fri, 30 Oct 2020 15:57:51 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 0E03F5C0208; Fri, 30 Oct 2020 11:57:50 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Fri, 30 Oct 2020 11:57:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=H L6qyB2zpw0wpFJXSC8w/fskXiDsOZ6GHnZbrpCT+BU=; b=FY7lwRz6i8u94G//r TnE+9wAjoUUi3TsHftNYu6s20Wxd3u1VIN490tJUg4osavmUoNm61+0nIvvJ+Kth uVOYXzdMOFIpZqFd3RUWNMDMjb59MDt9JgmTsxUPvg54iBBDwA76Nai/Fvz+8ES0 t2x2t5DsTUUYBX+ERFeeYOFwHbswQHkQ/liDvIVSldBP9J0aXQ5zMLIAJJ82tGVg OFX2vOTEw9DgX+nltjjwHuuwspcKS1ZdZfDaGo7+n6Q+4mhgKIipVW26FAZabue1 DfDI0Kq1BI0Auc7zfIPcwXY7FQ2OQ93+M149VfSAH3y7O57gyK0pqBS8BJdbKWXY exg1Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=HL6qyB2zpw0wpFJXSC8w/fskXiDsOZ6GHnZbrpCT+ BU=; b=B3jfYU8cN7IpX5gmWzprLijYOImDCzVgkknELio3XdbcmD2jomPnpd5/Z BGCyXJJRwmY0tOjNLmQ5k5utCm8pPwcI0fvToy2r1IvBRLTXZRXofdSBuBCTkV45 KjGJUMWeT9/Z4yqA+jdVbgKTG/6Xr95FKzEytGdUCyZmWL7e8ifnS3K6JN3MIICu 7pULCiF4Vf3IQSxVW0a4mAFxMc23riR0fwvPaKI2iIVwc9Rk4ZnNTEX+vOLdZmlD peKD+iUY4jAi6Z1KgwVza1iYgwLohws5VpivukFajNWr6JMx32KHsrlLZphHw/3/ XR5Nu0YhOANXDFAgHWgUrXzedbBFg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrleehgdejkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecuggftrfgrthhtvghrnhepteejvdetffejuedvleeifeefheeutdfhgfdvhffhhfek vdduveegvdejudefgfevnecukfhppeejgedrleegrdejfedrvddvvdenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghv vghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from ranger.suse (unknown [74.94.73.222]) by mail.messagingengine.com (Postfix) with ESMTPA id 78FCC3280063; Fri, 30 Oct 2020 11:57:49 -0400 (EDT) Subject: Re: Drop column constraint [FIXED] To: Rich Shepard , pgsql-general@lists.postgresql.org References: <6710083f-90d2-d111-45dd-e6f4162f825e@aklaver.com> From: Adrian Klaver Message-ID: <321fb1d3-7780-ebda-7bfe-06720f5d87a8@aklaver.com> Date: Fri, 30 Oct 2020 08:57:48 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 10/30/20 8:54 AM, Rich Shepard wrote: > 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 Actually unique is not the name, it is the constraint type. You can create your own name when creating the constraint or Postgres will create one for you. > latter, and adding 'cascade' (because the dependent table is empty) did the > trick. > > Thank you, > > Rich > > > -- Adrian Klaver adrian.klaver@aklaver.com