Thoughts on a cosntraint ?

From: stan <stanb(at)panix(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Thoughts on a cosntraint ?
Date: 2019-09-29 19:40:20
Message-ID: 20190929194020.GA16517@panix.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a table that consists of 3 columns.

vendor_key
mfg_key
preferred (boolean)

The idea is that a given vendor is the vendor we want to use for each
manufacturer for a given project.

I need to constrain such that only on row of mfg, vendor and project can
be set to TRUE.

I would be interested in seeing other peoples approaches on this, also.

Any thoughts?
--
"They that would give up essential liberty for temporary safety deserve
neither liberty nor safety."
-- Benjamin Franklin

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John W Higgins 2019-09-29 19:52:50 Re: Thoughts on a cosntraint ?
Previous Message Tom Lane 2019-09-29 18:15:31 Re: Possible bug: SQL function parameter in window frame definition