Re: BUG #18467: postgres_fdw (deparser) ignores LimitOption - Mailing list pgsql-bugs

From Japin Li
Subject Re: BUG #18467: postgres_fdw (deparser) ignores LimitOption
Date
Msg-id ME3P282MB3166635B2A6895BAB182449FB6ED2@ME3P282MB3166.AUSP282.PROD.OUTLOOK.COM
Whole thread Raw
In response to Re: BUG #18467: postgres_fdw (deparser) ignores LimitOption  (Etsuro Fujita <etsuro.fujita@gmail.com>)
Responses Re: BUG #18467: postgres_fdw (deparser) ignores LimitOption
Re: BUG #18467: postgres_fdw (deparser) ignores LimitOption
List pgsql-bugs
On Wed, 15 May 2024 at 17:41, Etsuro Fujita <etsuro.fujita@gmail.com> wrote:
> Hi Onder,
>
> On Wed, May 15, 2024 at 6:07 PM PG Bug reporting form
> <noreply@postgresql.org> wrote:
>> Hi, it seems the same query with `LimitOption`  on a heap table and on an
>> postgres_fdw table pointing to the same heap table is returning different
>> results.
>
> Thanks for the report!  Will look into this next week, because I am
> busy with something else this week.
>

AppendLimitClause() does not check the limitOption, which may be
LIMIT_OPTION_WITH_TIES. It simply uses the LIMIT clause.

Here is a poc patch to verify the above.

--
Regards,
Japin Li


Attachment

pgsql-bugs by date:

Previous
From: Andres Freund
Date:
Subject: Re: relfrozenxid may disagree with row XIDs after 1ccc1e05ae
Next
From: Sandeep Thakkar
Date:
Subject: Re: Postgresql 16.3 installation error (setup file) on Windows 11