Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lWCnA-00063Z-5M for pgsql-hackers@arkaria.postgresql.org; Tue, 13 Apr 2021 06:44:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lWCn7-0006BO-4D for pgsql-hackers@arkaria.postgresql.org; Tue, 13 Apr 2021 06:44:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lWCn6-0006BG-Tr for pgsql-hackers@lists.postgresql.org; Tue, 13 Apr 2021 06:44:52 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lWCmz-000210-Ey for pgsql-hackers@lists.postgresql.org; Tue, 13 Apr 2021 06:44:51 +0000 Received: from hnk.local (an054019.ppp.asahi-net.or.jp [61.87.54.19]) by oss.nttdata.com (Postfix) with ESMTPSA id A9E0262919; Tue, 13 Apr 2021 15:44:40 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.3 at oss.nttdata.com Subject: Re: TRUNCATE on foreign table To: Justin Pryzby Cc: Bharath Rupireddy , Kohei KaiGai , Kazutaka Onishi , Zhihong Yu , Amit Langote , Ibrar Ahmed , pgsql-hackers@lists.postgresql.org, Ashutosh Bapat References: <43f71643-5068-8a77-4bda-005b0ff7bd4f@oss.nttdata.com> <551ed8c1-f531-818b-664a-2cecdab99cd8@oss.nttdata.com> <20210411041658.GB14564@telsasoft.com> <20210413005726.GK20530@telsasoft.com> <20210413034637.GA6091@telsasoft.com> From: Fujii Masao Message-ID: Date: Tue, 13 Apr 2021 15:44:40 +0900 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <20210413034637.GA6091@telsasoft.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021/04/13 12:46, Justin Pryzby wrote: > On Tue, Apr 13, 2021 at 12:38:35PM +0900, Fujii Masao wrote: >> + Relation data structures for each >> + foreign tables to be truncated. >> >> "foreign tables" should be "foreign table" because it follows "each"? > > Yes, you're right. > >> + >> + behavior is either >> + DROP_RESTRICT or DROP_CASCADE. >> + DROP_CASCADE indicates that the >> + CASCADE option was specified in the original >> TRUNCATE 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, behavior is either DROP_RESTRICT or DROP_CASCADE, which indicates that the RESTRICT or CASCADE option was requested in the original TRUNCATE command, respectively. Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION