Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s2X1r-003nly-GD for pgsql-sql@arkaria.postgresql.org; Thu, 02 May 2024 14:03:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1s2X1o-000m68-TI for pgsql-sql@arkaria.postgresql.org; Thu, 02 May 2024 14:03:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s2X1o-000m60-Kk for pgsql-sql@lists.postgresql.org; Thu, 02 May 2024 14:03:17 +0000 Received: from mail-ot1-x32b.google.com ([2607:f8b0:4864:20::32b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1s2X1n-0015jK-4o for pgsql-sql@postgresql.org; Thu, 02 May 2024 14:03:16 +0000 Received: by mail-ot1-x32b.google.com with SMTP id 46e09a7af769-6ee4162061fso2128072a34.1 for ; Thu, 02 May 2024 07:03:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714658594; x=1715263394; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=0Lg3bDl6LV7tBZUnj0sllkmeKFUhWrp0Oo1lxdabqTM=; b=Cf5uIgtz93VNkqa3zmWti8DdrsbKNni/BjD/3jDIEB2wQvYfVsOTTCT9fnTQq/PMWw dC94uDNeSnYuqHc3LKRTnBGYl1xVtoFP3NxjOF9hTgeq0o1/xPL8ju52onzN1OLOwq97 AwLXvjJ9JecO0WtSrb45wOp8utn/9xgaPOPUtDXIWLA8CXgij5H4SIp6nWu9MwytLaLd eajmmBr4WhGldNn5wEwWQw5Vdq8mK+ZM2Zfx4B+oKxCYqrawBh7EHMn1C9S7a0Ovq5u8 FN0wKMjdRylLZ7AcceFD2N/HYMwy4kL6ZnmguBAE+YHpoXLIFcg6LPc82zfWHJxSd3OX Y9dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714658594; x=1715263394; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0Lg3bDl6LV7tBZUnj0sllkmeKFUhWrp0Oo1lxdabqTM=; b=eKlKjiF5Kb5TySiwSWXX0XyPttJc2J/SRBwVaeO03/pWuabEUGCt61QC6wFrsCYzfk LvtqNoYEayEwo+Ux8MQ7uF2HZo5Q7eececezpN5GsY87WIo7zUXfcv3oxYUv41i+Wx2c rWeQMHrWg1aXSlbUkkRfsA+9rQ/W1ZO3AOgE9PRXBYL5AjyAMD0eVN0pokmZj5At5AQB Ltltc7whZTEsx55CNEdu3a8G8OicBX7NsTfWCSdXR9irj+6ykuAnjT7Kxm5xaNnwPls5 xb5I89xbER67s112/9SdkddOCNDLgumtb1cSFsuTjrYZi0vTf5O+Xi8voIH1zeRpy3GL ISLQ== X-Gm-Message-State: AOJu0YxqopBuBkQoaej+F12Y03VhV0T036HUxPERD66d0SlXjx+jz6FK ppDwcAdjsveSxY8EOLhxacPMOB7HUYqzmvQDKloxDE32m/xIjQ9CMZR0wa9i0c3P70X0nRcPq/7 FnDY9cWFmJiM94fLwwF/jPImMu7zHMw== X-Google-Smtp-Source: AGHT+IFyj9IFYpF/dS/S9MO8XoYGsocQsdytEldY2Tbnd6MYrV6vTrbc/SBgTIOmOLOpkhHr7kzYDvIxeu2Hu/N34Ro= X-Received: by 2002:a9d:7617:0:b0:6ee:37be:c11d with SMTP id k23-20020a9d7617000000b006ee37bec11dmr5932516otl.6.1714658594371; Thu, 02 May 2024 07:03:14 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "David G. Johnston" Date: Thu, 2 May 2024 07:02:37 -0700 Message-ID: Subject: Re: One parent record with 3 possible child records To: Rob Sargent Cc: "pgsql-sql@postgresql.org" , JORGE MALDONADO Content-Type: multipart/alternative; boundary="0000000000006dc16b061779107a" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000006dc16b061779107a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, May 2, 2024 at 6:37=E2=80=AFAM Rob Sargent = wrote: > Presuming the id is unique in parent and child, what=E2=80=99s the value = of the > type field in the foreign key? Are you saying the PK on tableMain is > (type,id), perhaps for clustering purposes? > > > Preventing the parent record from saying "tblOne" while the actual ID value is present on "tblTwo". David J. --0000000000006dc16b061779107a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, May 2, 2024 at 6:37=E2=80=AFAM Rob Sargent <robjsargent@gmail.com> wrote:<= /span>
Presuming the id is unique in parent and child, what= =E2=80=99s the value of the type field in the foreign key?=C2=A0 Are you sa= ying the PK on tableMain is (type,id), perhaps for clustering purposes?
=


Prev= enting the parent record from saying "tblOne" while the actual ID= value is present on "tblTwo".

David J.

--0000000000006dc16b061779107a--