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 1sKgen-00BbuJ-LA for pgsql-general@arkaria.postgresql.org; Fri, 21 Jun 2024 15:58:33 +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 1sKgel-004B7T-Ou for pgsql-general@arkaria.postgresql.org; Fri, 21 Jun 2024 15:58:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sKgel-004B4x-Dk for pgsql-general@lists.postgresql.org; Fri, 21 Jun 2024 15:58:31 +0000 Received: from mail-oa1-x2d.google.com ([2001:4860:4864:20::2d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sKgej-002qsJ-MH for pgsql-general@lists.postgresql.org; Fri, 21 Jun 2024 15:58:31 +0000 Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-25982aa59efso1044790fac.3 for ; Fri, 21 Jun 2024 08:58:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718985507; x=1719590307; darn=lists.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=9fAOVln2gv8Z1YEqRgaY89sPCQzXsoh1bjcMVos1KwE=; b=ElOMSlVHOcp4yqEUQclGegprE6/TtPNQZ/G+x0Wy+bwqhjTzpWmx25f0Wzb4G7mXbv GzjUC3e5cVxzledo8hb+uIDMaTnH4zH9ROH5qYcr/3AYMziRDgvMHbKEk88ZUUL7JYH8 KO83Ulsz0GCGDrDfhdID4DVDxuqZ5Y90DEqBh9Ij3HUpiP3GWCMhHEbh08X8UYQH/UsE nv4gLvBJUZjrKqAAhuiPz3L0wwHeXUTTN1O5kGm9XeaDL3I1m5cYAC8b1RtzKPHdhQRy nivW8/V1RInSAR/DfACt5t2lW5/ZCvrgfhOlX6FiISNW60pcr0NRjHfj3v0Irk+XXcrt EUYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718985507; x=1719590307; 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=9fAOVln2gv8Z1YEqRgaY89sPCQzXsoh1bjcMVos1KwE=; b=jth4ybc0quvIOsvP0QjuZ6uXkIeJMR+1C1hGYlYGzOu8YQa0atlOSyh7RqxeBjoWoQ Oi2NlgIkTVI/faJI8poFnP7DoLbzHh9dYGRGj+5vCodPafkPwRIjeteO4m4fWUL1/V7t EIJDeRfvgpzm0UvUjWUHqfArkDAbc0Asp/tNdVchROqUoe9Enqqkf3lM9TRA/pD/CsWg NUs3h9Xcx73jpzTv/K0wb9ZGIiYtgr3tXFJgwAfDBUF82mPRwuwDDYf9QFiCDUAM/epG TJeSsyYyXkSBRIWag9mxlntwqEe+d5kzvHt3HrxXI3/msxU6NYs8cD9cQl02TWutlFyV bdLQ== X-Forwarded-Encrypted: i=1; AJvYcCUvA8cz1gWuFFMTqdOni1sAD10YZknud2+pCwqnlCnDBVaLidLbx81jon62UcgXEBOHLaJCg6h8RNW/41mzutOKr7AGdULEJaFgxk4mYNroAvlY X-Gm-Message-State: AOJu0YxBJOokt68e/KBGOXBAbx91PrGdApd5H7lwJF4SZaSXEpIu0O98 bPLkpBTbvh7CCztaWEIr4msy/rLIgEvE5krkFT1PL8eCKNsPaT+OWEM8sXLBc4T0g5tBo6S/p89 9hw7OM6RZGJYUgFKSTTtonG/EKPw= X-Google-Smtp-Source: AGHT+IEX+4/fiHucQg7RYPRoZAub2ryDiqfSb54atPslRHyflEKbZp5ZPrshasoIlTTXj2YYTfKDKO/cBKErBoUkeHU= X-Received: by 2002:a05:6870:80d1:b0:250:7510:894f with SMTP id 586e51a60fabf-25c94a1efc6mr9603004fac.30.1718985506911; Fri, 21 Jun 2024 08:58:26 -0700 (PDT) MIME-Version: 1.0 References: <3528232.1718682678@sss.pgh.pa.us> <597261.1718985078@sss.pgh.pa.us> In-Reply-To: <597261.1718985078@sss.pgh.pa.us> From: "David G. Johnston" Date: Fri, 21 Jun 2024 08:57:49 -0700 Message-ID: Subject: Re: RowDescription for a function does not include table OID To: Tom Lane Cc: Maxwell Dreytser , "pgsql-general@lists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000837dcc061b6880cb" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000837dcc061b6880cb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jun 21, 2024 at 8:51=E2=80=AFAM Tom Lane wrote: > > The PG wire protocol specification [1] defines these fields thus: > > If the field can be identified as a column of a specific > table, the object ID of the table; otherwise zero. > > If the field can be identified as a column of a specific > table, the attribute number of the column; otherwise zero. > > My reading of that is that we should populate these fields only for > the case of direct selection from a table. > s/can be identified as/is/g ? Experience shows people are inferring a lot from "can be identified" so we should remove it. "is" maybe over-simplifies a bit but in the correct direction. David J. --000000000000837dcc061b6880cb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, Jun 21, 2024 at 8:51=E2=80=AFAM Tom Lane <tgl@sss.pgh.pa.us> wrote:
=

The PG wire protocol specification [1] defines these fields thus:

=C2=A0 =C2=A0 =C2=A0 =C2=A0 If the field can be identified as a column of a= specific
=C2=A0 =C2=A0 =C2=A0 =C2=A0 table, the object ID of the table; otherwise ze= ro.

=C2=A0 =C2=A0 =C2=A0 =C2=A0 If the field can be identified as a column of a= specific
=C2=A0 =C2=A0 =C2=A0 =C2=A0 table, the attribute number of the column; othe= rwise zero.

My reading of that is that we should populate these fields only for
the case of direct selection from a table.

<= div class=3D"gmail_default" style=3D"font-family:arial,helvetica,sans-serif= ">s/can be identified as/is/g=C2=A0 ?

Experience shows= people are inferring a lot from "can be identified" so we should= remove it.=C2=A0 "is" maybe over-simplifies a bit but in the cor= rect direction.

David J.
--000000000000837dcc061b6880cb--