Drop column constraint

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Drop column constraint
Date: 2020-10-30 15:30:50
Message-ID: alpine.LNX.2.20.2010300825310.24081@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

A table has a unique constraint on a column that needs removing. Reading the
postgres-12.x docs for alter table it appears the correct syntax is:

alter table locations drop constraint unique;

but this is wrong.

Trying 'alter table locations alter column loc_nbr drop constraint unique;' also
failed.

What's the proper syntax to drop the unique constraint on a table column?

TIA,

Rich

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2020-10-30 15:37:27 Re: Drop column constraint
Previous Message Peter J. Holzer 2020-10-30 10:45:18 Re: Issue executing query from container