回复:BUG #18398: Simplified SQL Query for Problem Diagnosis

From: 1724647576 <1724647576(at)qq(dot)com>
To: akuluasan <akuluasan(at)163(dot)com>, pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Cc: akuluasan <akuluasan(at)163(dot)com>
Subject: 回复:BUG #18398: Simplified SQL Query for Problem Diagnosis
Date: 2024-04-01 08:14:13
Message-ID: tencent_5117F111D4612295B05070112B0841416C08@qq.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Yes, I think it may be quite useful.

------------------&nbsp;原始邮件&nbsp;------------------
发件人: "PG Bug reporting form"<noreply(at)postgresql(dot)org&gt;;
发送时间: 2024年3月18日(星期一) 晚上10:05
收件人: "pgsql-bugs"<pgsql-bugs(at)lists(dot)postgresql(dot)org&gt;;
抄送: "akuluasan"<akuluasan(at)163(dot)com&gt;;
主题: BUG #18398: Simplified SQL Query for Problem Diagnosis

Bug reference:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 18398
Logged by:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Heil
Email address:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; akuluasan(at)163(dot)com
PostgreSQL version: 16.2
Operating system:&nbsp;&nbsp; ubuntu 20.04
Description:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

I attempting to execute a complex SQL query from BUG #18305. To make it
easier to diagnose and fix the issue, I have&nbsp; 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&nbsp; 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&nbsp;
&nbsp;&nbsp;&nbsp; ntile(exeet_subq_0.c_0) over () as c_0
&nbsp; from
&nbsp;&nbsp;&nbsp; (select (select pkey from exeet_t3 order by pkey limit 1 offset 6) as
c_0) as exeet_subq_0;

--- Test case ---
select&nbsp;
&nbsp;&nbsp;&nbsp; 1 as c_1
&nbsp; from
&nbsp;&nbsp;&nbsp; exeet_t8 as exeet_ref_17
&nbsp; 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:&nbsp; 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&nbsp;
&nbsp;&nbsp;&nbsp; ntile(exeet_subq_0.c_0) over () as c_0
&nbsp; from
&nbsp;&nbsp;&nbsp; (select (select pkey from exeet_t3) as
c_0) as exeet_subq_0;

--- Test case ---
select&nbsp;
&nbsp;&nbsp;&nbsp; 1 as c_1
&nbsp; from
&nbsp;&nbsp;&nbsp; exeet_t8 as exeet_ref_17
&nbsp; 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:&nbsp; WindowFunc not found in subplan target lists

I kindly request the development team to examine this&nbsp; simplified query to
identify the root cause of the BUG #18305 and fix the&nbsp; issue as soon as
possible. By the way, please let me know if&nbsp; this&nbsp; simplified query is
useful.I believe that by analyzing and fixing this simplified query, you can
more easily locate the problem in the original&nbsp; complex query.

Thank you for your hard work and support!

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Laurenz Albe 2024-04-02 08:04:53 Re: BUG #18416: Confirmation of Issue with PostgreSQL ODBC Driver for Windows
Previous Message 2024-04-01 00:22:53 RE: BUG #18416: Confirmation of Issue with PostgreSQL ODBC Driver for Windows