Re: Drop column constraint [FIXED]

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Drop column constraint [FIXED]
Date: 2020-10-30 15:57:48
Message-ID: 321fb1d3-7780-ebda-7bfe-06720f5d87a8@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Gauthier 2020-10-30 16:03:30 What's the best way to translate MS generated translations of user input to what the user actually typed prior to insert or update into PG backend table ?
Previous Message Rich Shepard 2020-10-30 15:54:57 Re: Drop column constraint [FIXED]