Re: TRUNCATE on foreign table

Justin Pryzby <pryzby@telsasoft.com>

From: Justin Pryzby <pryzby@telsasoft.com>
To: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, Kohei KaiGai <kaigai@heterodb.com>, Kazutaka Onishi <onishi@heterodb.com>, Zhihong Yu <zyu@yugabyte.com>, Amit Langote <amitlangote09@gmail.com>, Ibrar Ahmed <ibrar.ahmad@gmail.com>, pgsql-hackers@lists.postgresql.org, Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Date: 2021-04-13T03:46:37Z
Lists: pgsql-hackers
On Tue, Apr 13, 2021 at 12:38:35PM +0900, Fujii Masao wrote:
> +     <structname>Relation</structname> data structures for each
> +     foreign tables to be truncated.
> 
> "foreign tables" should be "foreign table" because it follows "each"?

Yes, you're right.

> +    <para>
> +     <literal>behavior</literal> is either
> +     <literal>DROP_RESTRICT</literal> or <literal>DROP_CASCADE</literal>.
> +     <literal>DROP_CASCADE</literal> indicates that the
> +     <literal>CASCADE</literal> option was specified in the original
>       <command>TRUNCATE</command> command.
> 
> Why did you remove the description for DROP_RESTRICT?

Because in order to handle the default/unspecified case, the description was
going to need to be something like:

| DROP_RESTRICT indicates that the RESTRICT option was specified in the original
| truncate command (or CASCADE option was NOT specified).

-- 
Justin



Commits

  1. doc: Review for "Allow TRUNCATE command to truncate foreign tables".

  2. Don't pass "ONLY" options specified in TRUNCATE to foreign data wrapper.

  3. Support tab-complete for TRUNCATE on foreign tables.

  4. Allow TRUNCATE command to truncate foreign tables.

  5. Add support for asynchronous execution.