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 1lABwZ-0003F3-Ui for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Feb 2021 13:23:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lABwY-0008Uz-T3 for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Feb 2021 13:23:38 +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 1lABwY-0008SW-MV for pgsql-hackers@lists.postgresql.org; Thu, 11 Feb 2021 13:23:38 +0000 Received: from mail-ua1-x936.google.com ([2607:f8b0:4864:20::936]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lABwW-0003TT-Bj for pgsql-hackers@lists.postgresql.org; Thu, 11 Feb 2021 13:23:37 +0000 Received: by mail-ua1-x936.google.com with SMTP id 67so1721691uao.1 for ; Thu, 11 Feb 2021 05:23:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=izDZZ5+mUlnlN+JaE0KHAuTNW/h/OL79hnZQ4Co/LEQ=; b=Ro6ts0ORKflYoJAcHKmM+lTdLzzoaj9GmE6+cS8kMvEIOHZMe4HGyxHl9AA5HJ8FyC 3Tpu6VnPT+Jl9dM2fDaFKwze3gAACJW5mvbi8OmlD47oy0H0ZHSomhM3TcYXJtZ0honf iWEE2P+m0icKyKFQKWGbVWH4yD1h+arfUL4o5dJRXyw6fY2GbVIDf3m9AjwZE5Gf8FtK INDLNwvXuUbHLkQlb8C2YnsDn1Z+c8JFB7VNWYhU2cOwR60aIDdkIJ5Fpi7Z7DbwYSBJ KDfgCV4ePX42H5hdPsB9cHWFnGZEeWRjxjKB8q39cL9rnYZT0l9Kn1rMj5OWtHZfEcbW AojA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=izDZZ5+mUlnlN+JaE0KHAuTNW/h/OL79hnZQ4Co/LEQ=; b=WIESh+AqV020VApBzITQ87E7Wqj26Id8i0AkqXOHT7MU8Vo/XbSlh/5iAwFxHloj2w NnmrSjUhWEMW4nOThYM7aZ27+bbq/wwNoTR64wsBY3D38Elxk9MlrCXy1nTARQQNL8Jv EcoEemXQusTBoKTeyNscKQO4zPcpJgiabRJ0QoKNJmNeb+jPvdKEBhf3IiGa2wGJj+U3 fHlYKFhOCpGcfdz9IPBpQrEN++OO4XFZJH1lP0PP394dyJ5u6j18Vc0fVHboqEKHG3Im wQgVN/HxNSraSPhJfjtluY7Vke0BgnKPgTqg0vtuKHlaW3/by/nYD9vUITAA3ja0/SFa qtWQ== X-Gm-Message-State: AOAM531QV7OBuRXMN66ulzRK2K6ozwBbZ6wN1ffr7V5IH+tb9nJKrMAG 5bKOsYId+Oo/oWdnK6w0fiU5PnXER5n6H/1FlzU= X-Google-Smtp-Source: ABdhPJxCWrWcNE+F+yAhYsGtWP+SFsRI2EynJc+ldmdqAgQHsUPL8UQqvgjkfBldlse8Q2FIBYaoBIvHQWg9fgm2JrY= X-Received: by 2002:ab0:614d:: with SMTP id w13mr4603213uan.67.1613049815439; Thu, 11 Feb 2021 05:23:35 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Ashutosh Bapat Date: Thu, 11 Feb 2021 18:53:24 +0530 Message-ID: Subject: Re: TRUNCATE on foreign table To: Kazutaka Onishi Cc: Bharath Rupireddy , Zhihong Yu , PostgreSQL Developers , Kohei KaiGai Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, Feb 10, 2021 at 10:58 PM Kazutaka Onishi wrote: > > That's because using the foreign server is difficult for the user. > > For example, the user doesn't always have the permission to login to the forein server. > In some cases, the foreign table has been created by the administrator that has permission to access the two servers and the user only uses the local server. > Then the user has to ask the administrator to run TRUNCATE every time. That might actually be seen as a loophole but ... > > Furthermore,there are some fdw extensions which don't support SQL. mongo_fdw, redis_fdw, etc... > These extensions have been used to provide SQL interfaces to the users. > It's hard for the user to run TRUNCATE after learning each database. this has some appeal. Thanks for sharing the usecases. -- Best Wishes, Ashutosh Bapat