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 1lZV8J-0001wn-CO for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Apr 2021 08:56:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lZV8H-0003yK-KL for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Apr 2021 08:56:21 +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 1lZV8H-0003yC-9B for pgsql-hackers@lists.postgresql.org; Thu, 22 Apr 2021 08:56:21 +0000 Received: from mail-oi1-x230.google.com ([2607:f8b0:4864:20::230]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lZV8D-0001yn-N6 for pgsql-hackers@lists.postgresql.org; Thu, 22 Apr 2021 08:56:19 +0000 Received: by mail-oi1-x230.google.com with SMTP id x20so11390017oix.10 for ; Thu, 22 Apr 2021 01:56:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=OnvK+GD60wiqjS2u83KXUonA24AnIxne6A//aSQWcb8=; b=bCnxFuX28y1WpOM0agfKO7MudRTnC554sRynHm4ofN6DIxRPqeWBheR+aiUxAzJIa/ HiQpSmExlnlOa4joPCZI+StCeCNXTUX0XRAjoyfezdy0hC3rOK8s6hmrgoabSUI5r664 VSe9JEOOXcdvqLj9WIWXc0EXiUoln9TBYMS4tBdVsUXFgBpL8Oro2SRk6O5X4eAZMpw3 qLzOd2110HvdtvK3NUWxyhzQZdfJ9Eieq3Z7FDrNqIER8D6cpfhla6K1duUk6/6ZdEk9 Sb99DR8VQmTNHS5Nb6T1LEhgthhbbFKUvHuI1YQW/u7RfgQ0ZnWLiyPf41lDaOpKVDDU IkwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=OnvK+GD60wiqjS2u83KXUonA24AnIxne6A//aSQWcb8=; b=E+fn4KvfsFwXLtg5PCtk0EC1ySARcCntTnQCahzAqMTOm+ywiesF0FP1kDiQK9xR/g rOSE/zjWsPXXHhvZkySH8i3v+bMebXbgv2yoaScswcK3auhRQh4tHrGRZDEwTo2dN5DX RFKlH8MTlryoI/Dc4yE5lVJ57JwMj/TN4H6U+PA4KUjPOyF0aUZKM1IPweim4X80Rso+ IwPNKm0VRl34gWaOZOdcQz0bnYbZtn7JJ+WQBQI4ReN0eJKA7pjKJeknwmSuohZRtEmU V9Xy1KUiODuo5kMAI7PGm9jji1HU117SfyL4+HmKlx+jcGyBiuvSOymw0ZwB+S+oeBxn a2ZA== X-Gm-Message-State: AOAM532HXYioPGk8EFIv/EMdTG6Z4b5HS9wNUzpsH27JXfNBg1zz5Lxo RmXwBk+hUKYUmiBK1Qgsv8u6rw== X-Google-Smtp-Source: ABdhPJy31WaLy0qvlZYncr1WBuPgXt1mzJijZQW6RjTwEUx4R7ngnJppdZxBnL6oCc7htbsp3opdYA== X-Received: by 2002:aca:afcb:: with SMTP id y194mr9980161oie.44.1619081776844; Thu, 22 Apr 2021 01:56:16 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id e15sm468602otj.32.2021.04.22.01.56.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Apr 2021 01:56:16 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id D037F8006F0; Thu, 22 Apr 2021 03:56:14 -0500 (CDT) Date: Thu, 22 Apr 2021 03:56:14 -0500 From: Justin Pryzby To: Fujii Masao Cc: Bharath Rupireddy , Kohei KaiGai , Kazutaka Onishi , Zhihong Yu , Amit Langote , Ibrar Ahmed , PostgreSQL Developers , Ashutosh Bapat Subject: Re: TRUNCATE on foreign table Message-ID: <20210422085614.GA7256@telsasoft.com> References: <70310892-3572-f143-a692-e9aa4322a914@oss.nttdata.com> <2ec345ad-9a7b-a21f-8a1b-04c0537ea9b8@oss.nttdata.com> <94c99273-4b06-1b13-98da-a716e0454cac@oss.nttdata.com> <45bf0b95-b8e8-b1ee-015e-0cb4cf732def@oss.nttdata.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45bf0b95-b8e8-b1ee-015e-0cb4cf732def@oss.nttdata.com> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Apr 22, 2021 at 03:36:25PM +0900, Fujii Masao wrote: > diff --git a/doc/src/sgml/fdwhandler.sgml b/doc/src/sgml/fdwhandler.sgml > index 553524553b..69aa66e73e 100644 > --- a/doc/src/sgml/fdwhandler.sgml > +++ b/doc/src/sgml/fdwhandler.sgml > @@ -1076,27 +1076,25 @@ ExecForeignTruncate(List *rels, > bool restart_seqs); > > - behavior defines how foreign tables should > - be truncated, using as possible values DROP_RESTRICT, > - which means that RESTRICT option is specified, > - and DROP_CASCADE, which means that > - CASCADE option is specified, in > - TRUNCATE command. > + behavior is either DROP_RESTRICT > + or DROP_CASCADE, which indicates that the > + RESTRICT or CASCADE option was > + requested in the original TRUNCATE command, > + respectively. Now that I reread this, I would change "which indicates" to "indicating". > - restart_seqs is set to true > - if RESTART IDENTITY option is specified in > - TRUNCATE command. It is false > - if CONTINUE IDENTITY option is specified. > + If restart_seqs is true, > + the original TRUNCATE command requested the > + RESTART IDENTITY option, otherwise > + CONTINUE IDENTITY option. should it say "specified" instead of requested ? Or should it say "requested the RESTART IDENTITY behavior" ? Also, I think it should say "..otherwise, the CONTINUE IDENTITY behavior was requested". > +++ b/doc/src/sgml/ref/truncate.sgml > @@ -173,7 +173,7 @@ TRUNCATE [ TABLE ] [ ONLY ] name [ > > > TRUNCATE can be used for foreign tables if > - the foreign data wrapper supports, for instance, > + supported by the foreign data wrapper, for instance, > see . what does "for instance" mean here? I think it should be removed. > +++ b/doc/src/sgml/fdwhandler.sgml > @@ -1111,6 +1099,15 @@ ExecForeignTruncate(List *rels, List *rels_extra, > if CONTINUE IDENTITY option is specified. > > > + > + Note that information about ONLY options specified > + in the original TRUNCATE command is not passed to > + ExecForeignTruncate. This is the same behavior as > + for the callback functions for SELECT, > + UPDATE and DELETE on There's an extra space before DELETE > diff --git a/doc/src/sgml/postgres-fdw.sgml b/doc/src/sgml/postgres-fdw.sgml > index 5320accf6f..d03731b7d4 100644 > --- a/doc/src/sgml/postgres-fdw.sgml > +++ b/doc/src/sgml/postgres-fdw.sgml > @@ -69,6 +69,13 @@ > have privileges to do these things.) > > > + > + Note that ONLY option specified in add "the" to say: "the ONLY" > + SELECT, UPDATE, > + DELETE or TRUNCATE > + has no effect when accessing or modifyung the remote table. modifying -- Justin