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 1sKfZT-00BXbV-2d for pgsql-general@arkaria.postgresql.org; Fri, 21 Jun 2024 14:48:59 +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 1sKfZR-002Tdh-7z for pgsql-general@arkaria.postgresql.org; Fri, 21 Jun 2024 14:48:57 +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 1sKfZQ-002TdZ-Qf for pgsql-general@lists.postgresql.org; Fri, 21 Jun 2024 14:48:57 +0000 Received: from mail-oi1-x22c.google.com ([2607:f8b0:4864:20::22c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sKfZO-002Qhq-HZ for pgsql-general@lists.postgresql.org; Fri, 21 Jun 2024 14:48:55 +0000 Received: by mail-oi1-x22c.google.com with SMTP id 5614622812f47-3c9c36db8eeso1050823b6e.0 for ; Fri, 21 Jun 2024 07:48:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718981334; x=1719586134; 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=pVqSiW+K8r3AmZW1pvHXq7n84TGKK3wAf6K3vgtxAXc=; b=NjiQNbpPEZ2/NAXhMnQIk1+zt73PS919BoURzkAdLDCLDzzqQ1/8orlBtG8HKxlAWO 3HUSMe4llh8V9Z2eIIo4a+5NAd652i9TumZNNS51JN4GKv4HWee4gAi3zjXuNgwmD3tv UcJNVGH/rxeSTw8Fz+CUWtKnqMW+Ej5v/JcUjstvVDeSdo/hNCqiTS/DkhYldAYyuHVr lL13+I2P/mnOeJKqZVfDAMu2T1LmsoWfHOmW2Xjyemph3zxke663LK/JIv4GOTvhpXVD ApYAoFfQnEKhQ9q7sIqxi1Mf8/0/V56m8o4x0LSG0VYYMNGEkcgTsRfnxu353g3eFVqd hCMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718981334; x=1719586134; 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=pVqSiW+K8r3AmZW1pvHXq7n84TGKK3wAf6K3vgtxAXc=; b=doowwlbevXh5mQWQNQIpgroe3M1UNvm6+NHUBVDkIk+qRxiMXFJQFO5a6UGbXGP1Gu MdmfTVxLRYtzA8GlLl9hphTupqGfNjExg6sQtF/lzOrrqhdKnA3BwBp+skMOOgLi36+h DMB/LUpXjilmY4DkIDVL1igKuihtU5RP6mHXOVXq2K5IJ8DzQ1kAbZuyryuj5eD+mVkn KTHL3KW+b9IFS2LGssDkjxFIbZQQKJ4CGfM9z0v8rErAyxw6m6DUTdZkWJ3Zm/kW/Orr LBw1B802B1/sdlqSZd9+gQtDxxjl8wjiM4PRoKjSochGZoE228oH6XQ1kIw4C8xVh9qq J5yQ== X-Gm-Message-State: AOJu0Yy0bZg0qNzZ75XAPJJZ7K+rdZMuwdxMIm7OpNDpX4oKn73BkURx qkyvFJtcPlvufemB137+1GJ2egc+oCI0nKb9v34Gq34QsBwrpPeEBgFFuoSxmLNIn7LsEdW3GZl NZ7D+ZpZFogT5YUNqTPQrXePp+Xk= X-Google-Smtp-Source: AGHT+IEotOXAxizMFM28vNhlYyqBTJM7Nr3PYpwWipkihUFwGrAj3UINK4QSHA6AVPbv7hY9izCq8bafQCeNmcqd7ww= X-Received: by 2002:a05:6808:178b:b0:3d2:2a2a:40da with SMTP id 5614622812f47-3d51bac4b6emr9677990b6e.37.1718981333718; Fri, 21 Jun 2024 07:48:53 -0700 (PDT) MIME-Version: 1.0 References: <3528232.1718682678@sss.pgh.pa.us> In-Reply-To: From: "David G. Johnston" Date: Fri, 21 Jun 2024 07:48:16 -0700 Message-ID: Subject: Re: RowDescription for a function does not include table OID To: Maxwell Dreytser Cc: "pgsql-general@lists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000c59ded061b678786" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000c59ded061b678786 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jun 21, 2024 at 7:42=E2=80=AFAM Maxwell Dreytser < Maxwell.Dreytser@assistek.com> wrote: > I am working on a meta-programming use-case where I need to scrape some > detailed information about the results of a function that "RETURNS TABLE > (LIKE physical_table)" > Yes, but the bug is yours. The definition you want is: RETURNS SETOF physical_table (not tested though) What you did was produce a one-column table whose column type is a composite (and whose name is like - what with case-folding of unquoted identifiers). Since that table doesn't exist anywhere in the catalogs it has no TableOID. David J. --000000000000c59ded061b678786 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, Jun 21, 2024 at 7:42=E2=80=AFAM Maxwell Dreytser &= lt;Maxwell.Dreytser@assist= ek.com> wrote:
I am working on a meta-programming use-case where I need to s= crape some detailed information about the results of a function that "= RETURNS TABLE (LIKE physical_table)"

Yes, but the bug is yours.=C2=A0 The definition y= ou want is:=C2=A0 RETURNS SETOF physical_table (not tested though)
=
What you did was produce a one-column table whose column type = is a composite (and whose name is like - what with case-folding of unquoted= identifiers).=C2=A0 Since that table doesn't exist anywhere in the cat= alogs it has no TableOID.

David J.

<= /div>
--000000000000c59ded061b678786--