From: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> |
---|---|
To: | Kirill Reshke <reshkekirill(at)gmail(dot)com> |
Cc: | jian he <jian(dot)universality(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: tab complete for COPY populated materialized view TO |
Date: | 2025-04-10 15:07:11 |
Message-ID: | a2b8cead-f02c-4a43-9934-7f6b724349e4@oss.nttdata.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2025/04/09 19:24, Kirill Reshke wrote:
> On Wed, 9 Apr 2025 at 14:45, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> wrote:
>>
>>
>>
>> On 2025/04/09 18:25, Kirill Reshke wrote:
>>> On Wed, 9 Apr 2025 at 13:23, jian he <jian(dot)universality(at)gmail(dot)com> 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 <tab> 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 I'm not mistaken, yes. I double checked.
>
>> INSTEAD OF INSERT triggers - though maybe that's overkill?
>
> That's wild to me, psql tab completions feature designed to support
> postgresql not fully, but in frequent cases. So maybe we should keep
> it stupud.
I agree that it's reasonable to exclude such rarely used objects from
tab-completion. How about including just tables, partitioned tables,
foreign tables, and materialized views?
I've attached a patch for that.
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
Attachment | Content-Type | Size |
---|---|---|
v2-0001-psql-Improve-tab-completion-for-COPY-command.patch | text/plain | 2.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Jacob Champion | 2025-04-10 15:14:55 | Re: Correct documentation for protocol version |
Previous Message | Bertrand Drouvot | 2025-04-10 15:05:29 | Re: Add os_page_num to pg_buffercache |