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 1hvQLV-0005Wb-MU for pgsql-general@arkaria.postgresql.org; Wed, 07 Aug 2019 18:07:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hvQLS-0006Pw-L5 for pgsql-general@arkaria.postgresql.org; Wed, 07 Aug 2019 18:07:30 +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 1hvQLS-0006Ln-4u for pgsql-general@lists.postgresql.org; Wed, 07 Aug 2019 18:07:30 +0000 Received: from mailbackend.panix.com ([166.84.1.89]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1hvQLI-0008KP-OL for pgsql-general@lists.postgresql.org; Wed, 07 Aug 2019 18:07:26 +0000 Received: from panix2.panix.com (panix2.panix.com [166.84.1.2]) by mailbackend.panix.com (Postfix) with ESMTP id 463fbn36Dcz145q for ; Wed, 7 Aug 2019 14:07:17 -0400 (EDT) Received: by panix2.panix.com (Postfix, from userid 17622) id 463fbn1kvVz1ZVM; Wed, 7 Aug 2019 14:07:17 -0400 (EDT) Date: Wed, 7 Aug 2019 14:07:17 -0400 From: stan To: pgsql-general@lists.postgresql.org Subject: Input validation Message-ID: <20190807180717.GA21152@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 Have table that contains employee keys, paired up with work type keys (both foreign keys) and a 3rd column that you enter a billing rate in. Then I have a table where employees enter their work. I need to validate that the employee, work type pair exists, before allowing the new record to be inserted. Any thoughts as to good way to do this? -- "They that would give up essential liberty for temporary safety deserve neither liberty nor safety." -- Benjamin Franklin