Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iEf3S-0007Pp-U8 for pgsql-general@arkaria.postgresql.org; Sun, 29 Sep 2019 19:40:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iEf3R-0000Xq-I4 for pgsql-general@arkaria.postgresql.org; Sun, 29 Sep 2019 19:40:25 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iEf3R-0000Ug-5L for pgsql-general@lists.postgresql.org; Sun, 29 Sep 2019 19:40:25 +0000 Received: from mailbackend.panix.com ([166.84.1.89]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iEf3O-0008On-J6 for pgsql-general@lists.postgresql.org; Sun, 29 Sep 2019 19:40:23 +0000 Received: from panix2.panix.com (panix2.panix.com [166.84.1.2]) by mailbackend.panix.com (Postfix) with ESMTP id 46hG8j0kTLz1GVv for ; Sun, 29 Sep 2019 15:40:20 -0400 (EDT) Received: by panix2.panix.com (Postfix, from userid 17622) id 46hG8h67C9z1ZVj; Sun, 29 Sep 2019 15:40:20 -0400 (EDT) Date: Sun, 29 Sep 2019 15:40:20 -0400 From: stan To: pgsql-general@lists.postgresql.org Subject: Thoughts on a cosntraint ? Message-ID: <20190929194020.GA16517@panix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Editor: gVim User-Agent: Mutt/1.12.1 (2019-06-15) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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