Re: TRUNCATE on foreign table - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: TRUNCATE on foreign table
Date
Msg-id e201283b-f246-1489-40d3-418ab0729fb2@oss.nttdata.com
Whole thread Raw
In response to Re: TRUNCATE on foreign table  (Fujii Masao <masao.fujii@oss.nttdata.com>)
List pgsql-hackers

On 2021/04/13 12:46, Justin Pryzby wrote:
> 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).

What about using "requested" instead of "specified"? If neither RESTRICT nor
CASCADE is specified, we can think that user requested the default behavior,
i.e., RESTRICT. So, for example,

     <literal>behavior</literal> is either <literal>DROP_RESTRICT</literal> or
     <literal>DROP_CASCADE</literal>, which indicates that the
     <literal>RESTRICT</literal> or <literal>CASCADE</literal> option was
     requested in the original <command>TRUNCATE</command> command, respectively.

Regards,


-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION



pgsql-hackers by date:

Previous
From: Ian Zagorskikh
Date:
Subject: Re: Contribution to PostgreSQL - please give an advice
Next
From: Thomas Munro
Date:
Subject: Re: Retry in pgbench