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 1ikHKr-0001HJ-06 for pgsql-general@arkaria.postgresql.org; Thu, 26 Dec 2019 00:49: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 1ikHKo-0002RG-W0 for pgsql-general@arkaria.postgresql.org; Thu, 26 Dec 2019 00:49:02 +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 1ikHKo-0002Qg-Bn for pgsql-general@lists.postgresql.org; Thu, 26 Dec 2019 00:49:02 +0000 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ikHKl-0002mK-9E for pgsql-general@lists.postgresql.org; Thu, 26 Dec 2019 00:49:00 +0000 Received: by mail-pj1-x1032.google.com with SMTP id m13so2781353pjb.2 for ; Wed, 25 Dec 2019 16:48:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=nwCiGf0LoMUzpxSeLen/fwDTmbcIlg+D79daer1Wq7I=; b=faEzolBh9B8U94Z38khXcF6dzJ+gIsT/GBiLS9KdQDOZcfuBpVrO2g+OF/zZnja2CX RDrpizcNU3LEFOqvmHFopavWtHelvDj2U1g4MP/m0c0lWXqvbNQ9sDo9FL1HW8Xl7yHD E6d/nrvaMrXQPAuzrFsQdBECgm3Deg44age/AmU6m1dMNI9cYRTN+6pMLMnKNTo9Hq6k rQjjEPrg6H5Pv1x11Da5hwGmlt4v9dzaVS2HCpB05G3KIr66y/+sHZQ0OcPAks6GOfVe o3jXz6zPr/WxG/ELLbzOPeYChO/snAa2Mt4UZAA8QWaWfm8pITKmtIkROfZw6INMCV1s a7Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=nwCiGf0LoMUzpxSeLen/fwDTmbcIlg+D79daer1Wq7I=; b=L0LZRKH1zvAhKNIMugLj21649JSw4ZyU7jws+JnYtnHq2V4Lm2Jt9yyUvZa2IfdC6b yjvdXefnEPbguhKHoqon8znxNquZQnQxqXUxjyO76hdyPULsCbVJqXpjC89O56pCX4Xs c0qVCkRygZj9EZYA6c0H/84WKsU1yPuJa6PcCRjNEawIzuIkhiyBdlzxrXrgOIGmiMcZ BUWjw+VmWotyw/Xyx8vQuKwiPENmchCAst7mdAkqCmYxFOpybOO6f2dvIj5hjBs5IgIU 0TIdb8+Dt7n2g0o7Iks87kfDoeH4WieAjw1wdKT3bMuzqzbv+MNBqOHeJDpSsgWcJQEP M+lw== X-Gm-Message-State: APjAAAU2vqrln98VQdYozyI1ox/n0xVME+7lgcGTIC0uGYkjBHiubrr6 SNhVcr2GagjIZ/rrJiNQWkgRcdGRSBcx9A== X-Google-Smtp-Source: APXvYqyJqJ2lnkCRfmvo+/0S/7GrtF3EXXc4ta0mll26UKPl9UsPerGVrz4dKGTDeMYyaMqGjnnMyA== X-Received: by 2002:a17:902:6906:: with SMTP id j6mr38944916plk.321.1577321337525; Wed, 25 Dec 2019 16:48:57 -0800 (PST) Received: from [192.168.1.80] (d23-16-92-185.bchsia.telus.net. [23.16.92.185]) by smtp.gmail.com with ESMTPSA id w6sm35255441pfq.99.2019.12.25.16.48.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Dec 2019 16:48:56 -0800 (PST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Rob Sargent Mime-Version: 1.0 (1.0) Subject: Re: Syntax question about returning value from an insert Date: Wed, 25 Dec 2019 16:48:55 -0800 Message-Id: <0BC9EA4D-B1F0-4354-BE2C-80BA8E12097B@gmail.com> References: <20191225230955.GB18451@panix.com> Cc: Adrian Klaver , pgsql-general@lists.postgresql.org In-Reply-To: <20191225230955.GB18451@panix.com> To: stan X-Mailer: iPhone Mail (17C54) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On Dec 25, 2019, at 3:10 PM, stan wrote: > There is more that that. There is a project number, so the actuall key > represents the combination of project number, and cost category, Thire is a= > constraint on T2 that assures that these combinations will be unique.=20 >=20 > When the 1st record for a project, that gets charged to the misc. cost > category is entered, I need to assure that combination gets inserted into > T2 Is mine the only nose reacting to this? Cost categories aren=E2=80=99t speci= fic to projects are they? Do you need more than a definition of cost categor= ies and then project specific expenditures use the category id? >=20 >=20