From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: akuluasan@163.com
Subject: BUG #18398: Simplified SQL Query for Problem Diagnosis
Date: Mon, 18 Mar 2024 14:05:58 +0000
Message-ID: <18398-1cdfeb09832a3c82@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 18398
Logged by: Heil
Email address: akuluasan@163.com
PostgreSQL version: 16.2
Operating system: ubuntu 20.04
Description:
I attempting to execute a complex SQL query from BUG #18305. To make it
easier to diagnose and fix the issue, I have simplified the original query.
The simplified query is intended to replicate the behavior that leads to the
system error, allowing us to focus on the core issue without getting lost
in the complexity of the original query.
-----Original reproduce step:-----
--- Set up database ---
create table exeet_t3 (pkey int4);
create view exeet_t8 as
select
ntile(exeet_subq_0.c_0) over () as c_0
from
(select (select pkey from exeet_t3 order by pkey limit 1 offset 6) as
c_0) as exeet_subq_0;
--- Test case ---
select
1 as c_1
from
exeet_t8 as exeet_ref_17
where exeet_ref_17.c_0 < 0;
--- Expected behavior ---
The test case should not trigger any error.
--- Actual behavior ---
The test case trigger an error:
ERROR: WindowFunc not found in subplan target lists
-----Minimal reproduce step:-----
--- Set up database ---
create table exeet_t3 (pkey int4);
create view exeet_t8 as
select
ntile(exeet_subq_0.c_0) over () as c_0
from
(select (select pkey from exeet_t3) as
c_0) as exeet_subq_0;
--- Test case ---
select
1 as c_1
from
exeet_t8 as exeet_ref_17
where exeet_ref_17.c_0 < 0;
--- Expected behavior ---
The test case should not trigger any error.
--- Actual behavior ---
The test case trigger an error:
ERROR: WindowFunc not found in subplan target lists
I kindly request the development team to examine this simplified query to
identify the root cause of the BUG #18305 and fix the issue as soon as
possible. By the way, please let me know if this simplified query is
useful.I believe that by analyzing and fixing this simplified query, you can
more easily locate the problem in the original complex query.
Thank you for your hard work and support!
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, akuluasan@163.com
Subject: Re: BUG #18398: Simplified SQL Query for Problem Diagnosis
In-Reply-To: <18398-1cdfeb09832a3c82@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox