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 09:54:03 |
Message-ID: | ME3P282MB31666446BF8A0C0F7A02D24CB6ED2@ME3P282MB3166.AUSP282.PROD.OUTLOOK.COM |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Thu, 16 May 2024 at 17:11, Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> wrote:
> Hi Japin,
>
> On Thu, May 16, 2024 at 1:02 PM Japin Li <japinli(at)hotmail(dot)com> wrote:
>> 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.
>
> Thanks for the patch! Will review.
>
I find that the FETCH FIRST ... ROWS WITH TIES does not support type casting.
For example:
postgres=# SELECT * FROM pg_class ORDER BY relname FETCH FIRST 2::bigint ROWS WITH TIES;
ERROR: syntax error at or near "::"
LINE 1: ...ECT * FROM pg_class ORDER BY relname FETCH FIRST 2::bigint R...
^
I've made a change to support type casting in the select_fetch_first_value.
Please consider reviewing the v2 patch.
--
Regards,
Japin Li
Attachment | Content-Type | Size |
---|---|---|
v2-0001-Push-down-FETCH-FIRST-WITH-TIES-to-the-remote-sid.patch | text/x-diff | 13.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Japin Li | 2024-05-16 09:56:46 | Re: BUG #18467: postgres_fdw (deparser) ignores LimitOption |
Previous Message | David Hunnisett | 2024-05-16 09:27:25 | differences between <> and != when using signed values on the right hand side |