From: | Zhihong Yu <zyu(at)yugabyte(dot)com> |
---|---|
To: | Kazutaka Onishi <onishi(at)heterodb(dot)com> |
Cc: | PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Kohei KaiGai <kaigai(at)heterodb(dot)com> |
Subject: | Re: TRUNCATE on foreign table |
Date: | 2021-02-06 17:10:00 |
Message-ID: | CALNJ-vSDcJhqQ1Wq8dq+gdtesfuyc++eC7rNZFvKfB003q2Qhg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
+ if (strcmp(defel->defname, "truncatable") == 0)
+ server_truncatable = defGetBoolean(defel);
Looks like we can break out of the loop when the condition is met.
+ /* ExecForeignTruncate() is invoked for each server */
The method name in the comment is slightly different from the actual method
name.
+ if (strcmp(defel->defname, "truncatable") == 0)
+ truncatable = defGetBoolean(defel);
We can break out of the loop when the condition is met.
Cheers
On Sat, Feb 6, 2021 at 5:11 AM Kazutaka Onishi <onishi(at)heterodb(dot)com> wrote:
> Hello,
>
> The attached patch is for supporting "TRUNCATE" on foreign tables.
>
> This patch includes:
> * Adding "ExecForeignTruncate" function into FdwRoutine.
> * Enabling "postgres_fdw" to use TRUNCATE.
>
> This patch was proposed by Kaigai-san in March 2020,
> but it was returned because it can't be applied to the latest source codes.
>
> Please refer to the discussion.
>
> https://www.postgresql.org/message-id/flat/CAOP8fzb-t3WVNLjGMC%2B4sV4AZa9S%3DMAQ7Q6pQoADMCf_1jp4ew%40mail.gmail.com#3b6c6ff85ff5c722b36c7a09b2dd7165
>
> I have fixed the patch due to submit it to Commit Fest 2021-03.
>
> regards,
>
> --
> ------------------
> Kazutaka Onishi
> (onishi(at)heterodb(dot)com)
>
From | Date | Subject | |
---|---|---|---|
Next Message | Zhihong Yu | 2021-02-06 17:21:08 | Re: CLUSTER on partitioned index |
Previous Message | Justin Pryzby | 2021-02-06 14:45:49 | Re: CLUSTER on partitioned index |