Re: [PATCH] psql: Add tab-complete for optional view parameters - Mailing list pgsql-hackers

From Dean Rasheed
Subject Re: [PATCH] psql: Add tab-complete for optional view parameters
Date
Msg-id CAEZATCU1Y5K8WVqBBnVrrVKqctZ8Sx3kP+68AQ3DFstbgdbXpQ@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] psql: Add tab-complete for optional view parameters  (vignesh C <vignesh21@gmail.com>)
List pgsql-hackers
On Fri, 6 Jan 2023 at 11:52, vignesh C <vignesh21@gmail.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



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Fix showing XID of a spectoken lock in an incorrect field of pg_locks view.
Next
From: Masahiko Sawada
Date:
Subject: Re: Fix showing XID of a spectoken lock in an incorrect field of pg_locks view.