Create unique index or constraint on part of a column - Mailing list pgsql-general

From Ruben Blanco
Subject Create unique index or constraint on part of a column
Date
Msg-id AANLkTinhtA7Gy4LrH16aMz=kPevyPXNx8-d355gV=g84@mail.gmail.com
Whole thread Raw
Responses Re: Create unique index or constraint on part of a column  (Thomas Kellerer <spam_eater@gmx.net>)
Re: Create unique index or constraint on part of a column  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-general
Hi:

Is there anyway to create a unique index or constraint on part of a column?

Something like this, but something that works ;-)

  ALTER TABLE invoices
  ADD CONSTRAINT cons UNIQUE (EXTRACT(YEAR FROM invoice_date), innvoice_number);

Thanks for any help.
Ruben,

pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Why count(*) doest use index?
Next
From: Thomas Kellerer
Date:
Subject: Re: Create unique index or constraint on part of a column