Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u2Rzj-000kbH-Bq for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Apr 2025 09:45:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u2Rzh-001hkx-ES for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Apr 2025 09:45:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u2Rzh-001hkn-4K for pgsql-hackers@lists.postgresql.org; Wed, 09 Apr 2025 09:45:17 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u2Rze-003qjZ-2T for pgsql-hackers@postgresql.org; Wed, 09 Apr 2025 09:45:16 +0000 Received: from [172.20.10.2] (sp49-97-70-90.msc.spmode.ne.jp [49.97.70.90]) by oss.nttdata.com (Postfix) with ESMTPSA id ECCE860F6E; Wed, 9 Apr 2025 18:45:09 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com Message-ID: <433a4165-7091-4afc-bcb9-1c1f7a5af5e0@oss.nttdata.com> Date: Wed, 9 Apr 2025 18:45:08 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: tab complete for COPY populated materialized view TO To: Kirill Reshke , jian he Cc: PostgreSQL-development References: Content-Language: en-US From: Fujii Masao In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025/04/09 18:25, Kirill Reshke wrote: > On Wed, 9 Apr 2025 at 13:23, jian he wrote: >> >> hi. >> >> we allow the "COPY table TO" command to copy rows from materialized >> views in [1]. >> The attached patch is to add a tab complete for it. >> >> [1] https://git.postgresql.org/cgit/postgresql.git/commit/?id=534874fac0b34535c9a5ab9257d6574f78423578 > > Hi! > Patch works good for me, but I noticed that psql COPY suggests > partitioned relation both with and without this patch. Maybe that's > not a big problem, if [0] will be pushed. Is the partitioned table currently tab-completed for the COPY FROM case? If we aim to support tab-completion for all valid targets of both COPY TO and COPY FROM, shouldn't foreign tables also be included? And what about views with INSTEAD OF INSERT triggers - though maybe that's overkill? Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION