Drop column constraint - Mailing list pgsql-general

From Rich Shepard
Subject Drop column constraint
Date
Msg-id alpine.LNX.2.20.2010300825310.24081@salmo.appl-ecosys.com
Whole thread Raw
Responses Re: Drop column constraint
Re: Drop column constraint
List 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




pgsql-general by date:

Previous
From: "Peter J. Holzer"
Date:
Subject: Re: Issue executing query from container
Next
From: Adrian Klaver
Date:
Subject: Re: Drop column constraint