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.96) (envelope-from ) id 1wBTDk-0015sx-39 for pgsql-hackers@arkaria.postgresql.org; Sat, 11 Apr 2026 07:57:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wBTDj-00G31N-0B for pgsql-hackers@arkaria.postgresql.org; Sat, 11 Apr 2026 07:57:35 +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.96) (envelope-from ) id 1wBTDi-00G31F-2L for pgsql-hackers@lists.postgresql.org; Sat, 11 Apr 2026 07:57:35 +0000 Received: from mail-ot1-x333.google.com ([2607:f8b0:4864:20::333]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wBTDg-00000000Sc9-1kck for pgsql-hackers@lists.postgresql.org; Sat, 11 Apr 2026 07:57:34 +0000 Received: by mail-ot1-x333.google.com with SMTP id 46e09a7af769-7dbd8c6fc84so1716269a34.3 for ; Sat, 11 Apr 2026 00:57:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1775894252; cv=none; d=google.com; s=arc-20240605; b=Jc7Z8rbf/QL/B0sHVPqGCOl2adWXo9aZJ+eBW73VdHcT8su78/LGjtFOeruplCs8vF blemtTJVEl9nbXIHXAkBoj63Cb1IWE/ZkXpqlSkghq9qY5soFtgzFvGDdqta/Ktix3jF lPJ2M+N+7LE3LPF5sJI55gEEc3EkpCTZSUpkkMa/pLagFniWkry/dn8S7u/L63yFPtKQ bqoObASPk6I0EAM+MSCAaZMI6ZEKk35mK0DjlLyPX0jx8LZy1BQh+g4n5sDSZrPwxbD+ kzh3TjraE9+SEzN3BuG8kfs1iKgQoX+GUB2XYMno+jinqoNvh+LmXQJ1Z4dsbxCFy6G4 xaoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=VKmWbOxnuoTMiZbsJBcPEWEQDmdGh7ltC8KJIzv6VD8=; fh=z6oTnQNCeIg8H9IweS3hQ5YmnbMdJiwmcNMQF5c9ElQ=; b=LD3/zeF4jx7aUorJva9npaPmawfP/AzkbzpyOG3emvIqJL6xr9m2hqz8m4OYTsS2Kx vFlbqSFF1R1R6rB4B+w+h+wDLfuP7LNrYl6dwMjh8hWq3v6XJm2dc5YymEAE1qLo2JiB TFoiQsUqwwGPqlC2PzdByWX5YHR4WWnAv4q6A10r5BkmgGQoUaqCLGmdCXCZXcADbO8R JFcFHZCzyL0Xf9PMMTaOe+fZpTfcPVcF9ambsVFNmMrfbW0Ci6Lcr9o3200f7m3offyO OExb19X/8mQfXU6GJ0cPXVuNPSX/rN5drkaBjCutPBBM9Dtgq/MRf53BPba2grCyVkvI mgcw==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775894252; x=1776499052; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=VKmWbOxnuoTMiZbsJBcPEWEQDmdGh7ltC8KJIzv6VD8=; b=h1mKk4p1/xd6jDeU4k/dxRA/b/3V9VeiHBfuDT8Bit6X/E54nLuH2es7Y2zUGasqh+ ilj1uNRc5s+TgDAY2YsDYZ+5/EyGBuWPORs5GtdJuGzYfxfNVRYdal9GYO8IN0SPM3jt ULNUcUpXjYppUxki5OlPeNQEH9qU6S20SDh9zWwWxp7UhShQ0q9pgkGo2uevUjrDr2I1 5fb7uVUB+8NkGGAMJsJfyaFu9WVX5vb/aTOqhAYfj/K84BpsAd2nXDcZTYvyq0flbkSu N+EnHqEj3pDXcuGVeto3Tw7Gz5oHacTzrQie8ambYlgSoss0IYLNkjfCjq4PRvV/RPge 2jUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775894252; x=1776499052; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=VKmWbOxnuoTMiZbsJBcPEWEQDmdGh7ltC8KJIzv6VD8=; b=hY7dA+KAXHZT/ejKDfOBzx0WRcglqiddBojzDSZzaZYq7rpF9y47t5B7PuRPsOhiTj YeqilA503teYVX8kJyQ/fV3qvA/cJmZLbxlZqycehjuJEwVUgQDqpSj8NWHRRw9LUNri J9RwNtS/GyhfEOvdfKbLT8ycWLgiX7dYefGuXMuarAyAUtpaPVQEefEdK0Arf4EUvi0P iOxUI/Xe+AKf/bnKgF7+UptUcc5Bwdr+bArW2x6oGYhCGmWTRCY0FccWC5u/ZoF8++VG QeSfG4pj9zKHfvyhWJxtwpMXq4J7nk1OzQ15HoX5HqkK9cLsc9tIWRiabP/xJKBRLCwB L9VA== X-Forwarded-Encrypted: i=1; AJvYcCWm3zs7c0MmwP/txeEI99hg/pCWh9Wc9EtyHKnTvLPGMAhod7Hqtw6PM0hxJ8BKOmEbB/jX+FSuw0WedmPE@lists.postgresql.org X-Gm-Message-State: AOJu0YyoI4XMaIUFoohavfLJ24GocqhBh90A9x+bDg8U8jftwN8M1ehK 5jqBrdq2z8GL2phv3yXti8FFA/VZaAlPwJf7ijbRDxqROQx4tOK2BeJtTKhCXDcqxX65RxkfXnB 15pG7ZDgMLPqyj8A/VwdtFnskPOTsLGY= X-Gm-Gg: AeBDiev4XndlT2gnO2IJW53Imao/xDuWHmpus7T99CrO51e3pAQ9VcMhOs7vch8vz0o vlMTh+ykmI/PBLj1BvZZkSIPF9YNW521pIhEeuwrm//mDq9Lj6O0f6vuf4hnOc/cRPDtVwXDh2W 5XMVKipNR9LVCmjNwcN8lyK7eFNxEdKve+BB7Kb135eT5fM+mqiLnirp02wRJU9F4hCDv8Ya2v+ 63TDhmwbxeabZkmMXxtdjzA+6e8VXSVABatGFCoV4nhI2UMQ7pfFws+SHTnLdzOhIcU609jTSoe HHkrIr/83w== X-Received: by 2002:a05:6820:2019:b0:685:a06a:89d9 with SMTP id 006d021491bc7-68be7de3872mr2976538eaf.36.1775894251983; Sat, 11 Apr 2026 00:57:31 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Richard Guo Date: Sat, 11 Apr 2026 16:57:21 +0900 X-Gm-Features: AQROBzDiHtnfSAhmWlf7ZkXyhNfQm1n2wkJfGCf04Hb0l7U72S_o0Bm1WjhYz2M Message-ID: Subject: Re: pg17: XX000: no relation entry for relid 0 To: Tender Wang Cc: Justin Pryzby , pgsql-hackers@lists.postgresql.org, Paul Jungwirth , Tom Lane , Michael Paquier Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, Apr 11, 2026 at 10:32=E2=80=AFAM Tender Wang w= rote: > Richard Guo =E4=BA=8E2026=E5=B9=B44=E6=9C=8810= =E6=97=A5=E5=91=A8=E4=BA=94 22:39=E5=86=99=E9=81=93=EF=BC=9A > > This looks like the right fix to me. We can use some comment here. > comments added. > Please see the attached patch. I've pushed and back-patched the fix after some tweaks to the comment and commit message. I also used explain (verbose, costs off) in the test case so that we can observe that the inner UNION ALL's output type doesn't match the outer's. Thanks for the report and the patch. - Richard