Re: Tab completion for "create unlogged" a bit too lax?

From: "Daniel Westermann (DWE)" <daniel(dot)westermann(at)dbi-services(dot)com>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Tab completion for "create unlogged" a bit too lax?
Date: 2021-08-24 12:04:28
Message-ID: ZR0P278MB0920121BB3A0EF977F40FBBCD2C59@ZR0P278MB0920.CHEP278.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>On Tue, Aug 24, 2021 at 11:32:14AM +0000, Daniel Westermann (DWE) wrote:
>> tab completion for "create unlogged" gives this:
>>
>> postgres=# create unlogged
>> MATERIALIZED VIEW  TABLE  
>>
>> Given that a materialized table can not be unlogged:
>>
>> postgres=# create unlogged materialized view mv1 as select 1;
>> ERROR:  materialized views cannot be unlogged
>>
>> Should this really show up there?

>It seems to be deliberate:

>commit 3223b25ff737c2bf4a642c0deb7be2b30bfecc6e
>Author: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
>Date:   Mon May 6 11:57:05 2013 -0400

>    Disallow unlogged materialized views.
>...
>    I left the grammar and tab-completion support for CREATE UNLOGGED
>    MATERIALIZED VIEW in place, since it's harmless and allows delivering a
>    more specific error message about the unsupported feature.

Hm, I think tab completion should only give choices for operations that are supposed to work. Anyway, thanks for pointing me to the commit, that makes it more clear why it is that way.

Regards
Daniel

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dipesh Pandit 2021-08-24 12:30:56 Re: .ready and .done files considered harmful
Previous Message Fabrízio de Royes Mello 2021-08-24 11:59:55 Re: [GSoC 2021 project summary] PL/Julia