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 1iEgYz-0001tV-Db for pgsql-general@arkaria.postgresql.org; Sun, 29 Sep 2019 21:17:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iEgYy-0006D5-6R for pgsql-general@arkaria.postgresql.org; Sun, 29 Sep 2019 21:17:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iEgYx-0006A5-2P for pgsql-general@lists.postgresql.org; Sun, 29 Sep 2019 21:17:03 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iEgYo-0003Hn-Sb for pgsql-general@lists.postgresql.org; Sun, 29 Sep 2019 21:17:02 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 1064921B2B; Sun, 29 Sep 2019 17:16:52 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 29 Sep 2019 17:16:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=C UZTSVBtoFDKVQ1lOiW6BiUb0kLb2Dlg1wrv3GF3EH4=; b=EohGhHEbV2qbtCTs1 rsOoU49Rdo5KCc4iBqr6FxhwssUhWToQ3W+LMJCCTmCRrz27yNT4JywizN68E8W/ LatbgeL8GFiWIQPzA34vWHIwr3fFw/s654YqNLFoTdpB1vemoZ1P3muX2sotGUA/ g1kPKVKMAlXE3M2JMf1ilKRvyTMMjWKePqbNwbr1DusEn9SSTeAB+7hNHNQ/R5H5 HNW3QyVGB5+7rq+CjJphKg/dMyPqsTfzlVjKnuAECrIFMHVyTbn91+RvQNVNAWb8 B9NmDFrXeuiHVQIW03SPjJ/+z8FQNlObBmAsRC/vF12crshKpkmuhd1avMCMTZdj Xqt1g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=CUZTSVBtoFDKVQ1lOiW6BiUb0kLb2Dlg1wrv3GF3E H4=; b=ysFNmnfJ7TwAbtmCb7Bz89Sk7fkK5J9E+6kcvMwa5TbKvnt1qkf1WrfWC b8Lx8xDYcoVbJ9RpOEEJlJnqQKrvKxNlROn/04F6p6d5Sz3Za6shlCuHDVcMdyq8 Nd8sm9zU0Jp0qYOerbyYghardUrQkrrMdBATJw23xWzF34rjjoa8v4M2pl1sOCC3 EuhzEK9l2vhzwMopwidjl3k/6fvbboOlXzr8iFkdwuymCzlM6FHO/mP3umhBKNH8 rbJuPbw2Pu3K/wdXSOIAbyWTiQmVpvyO2bwNECO3at1ITlP7ocaevfCBlmcdjMDc hzU0F3ZYBSiphAHkhAPNjrTi/phoA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrgedtgdduieduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtje ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecukfhppedujeegrddvuddruddvledrud ekleenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghk lhgrvhgvrhdrtghomhenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from [192.168.1.3] (174-21-129-189.tukw.qwest.net [174.21.129.189]) by mail.messagingengine.com (Postfix) with ESMTPA id 1252F80063; Sun, 29 Sep 2019 17:16:50 -0400 (EDT) Subject: Re: Thoughts on a cosntraint ? To: stan , pgsql-general@lists.postgresql.org References: <20190929194020.GA16517@panix.com> From: Adrian Klaver Message-ID: Date: Sun, 29 Sep 2019 14:16:50 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20190929194020.GA16517@panix.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 9/29/19 12:40 PM, stan wrote: > 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. Where is the project id? > > I would be interested in seeing other peoples approaches on this, also. > > Any thoughts? > -- Adrian Klaver adrian.klaver@aklaver.com