Re: Unique index - Mailing list pgsql-admin

From Laurenz Albe
Subject Re: Unique index
Date
Msg-id 3983831447229a17fc9028fd2f5b2aaf0996c291.camel@cybertec.at
Whole thread Raw
In response to Unique index  (Rajesh Kumar <rajeshkumar.dba09@gmail.com>)
List pgsql-admin
On Wed, 2023-09-20 at 19:16 +0530, Rajesh Kumar wrote:
> Why unique index is used over unique constraints?

A unique constraint is implemented by a unique index.
If you create the constraint, the index is created automatically.
You cannot drop the index unless you drop the constraint.

Yours,
Laurenz Albe



pgsql-admin by date:

Previous
From: Rajesh Kumar
Date:
Subject: Unique index
Next
From: Erik Wienhold
Date:
Subject: Re: Unique index