Re: BUG #18467: postgres_fdw (deparser) ignores LimitOption

From: Japin Li <japinli(at)hotmail(dot)com>
To: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
Cc: onderkalaci(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18467: postgres_fdw (deparser) ignores LimitOption
Date: 2024-05-16 04:02:14
Message-ID: ME3P282MB3166635B2A6895BAB182449FB6ED2@ME3P282MB3166.AUSP282.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


On Wed, 15 May 2024 at 17:41, Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> wrote:
> Hi Onder,
>
> On Wed, May 15, 2024 at 6:07 PM PG Bug reporting form
> <noreply(at)postgresql(dot)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 Content-Type Size
bug#18467.patch text/x-diff 788 bytes

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Sandeep Thakkar 2024-05-16 06:27:51 Re: Postgresql 16.3 installation error (setup file) on Windows 11
Previous Message Andres Freund 2024-05-16 03:33:08 Re: relfrozenxid may disagree with row XIDs after 1ccc1e05ae