Re: [PATCH] psql: Add tab-complete for optional view parameters

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: vignesh C <vignesh21(at)gmail(dot)com>
Cc: Christoph Heiss <christoph(at)c8h4(dot)io>, Melih Mutlu <m(dot)melihmutlu(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] psql: Add tab-complete for optional view parameters
Date: 2023-01-06 12:18:44
Message-ID: CAEZATCU1Y5K8WVqBBnVrrVKqctZ8Sx3kP+68AQ3DFstbgdbXpQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 6 Jan 2023 at 11:52, vignesh C <vignesh21(at)gmail(dot)com> wrote:
>
> One suggestion:
> Tab completion for "alter view v1 set (check_option =" is handled to
> complete with CASCADED and LOCAL but the same is not handled for
> create view: "create view viewname with ( check_option ="
> + else if (Matches("ALTER", "VIEW", MatchAny, "SET", "(",
> "check_option", "="))
> + COMPLETE_WITH("local", "cascaded");
>
> I felt we should keep the handling consistent for both create view and
> alter view.
>

Hmm, I don't think we should be offering "check_option" as a tab
completion for CREATE VIEW at all, since that would encourage users to
use non-SQL-standard syntax, rather than CREATE VIEW ... WITH
[CASCADED|LOCAL] CHECK OPTION.

Regards,
Dean

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2023-01-06 12:30:04 Re: Fix showing XID of a spectoken lock in an incorrect field of pg_locks view.
Previous Message Amit Kapila 2023-01-06 11:59:56 Re: Fix showing XID of a spectoken lock in an incorrect field of pg_locks view.