Re: BUG #13814: missing command in psql autocompletion

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: johannes(at)selfnet(dot)de
Cc: PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #13814: missing command in psql autocompletion
Date: 2015-12-14 05:42:29
Message-ID: CAB7nPqRUNPhh7h_uFeNtZKPd2J=hEwZXbYMn90kwoc8YqV8tRA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Dec 14, 2015 at 4:32 AM, <johannes(at)selfnet(dot)de> wrote:
> I'm pretty accustomed to the autocompletion feature of psql. Now, I found
> that altering the tablespace of a materialized view is not included in the
> autocompletion options:
>
> db=> ALTER MATERIALIZED VIEW mvname <tab>
>
> offers ALTER COLUMN, OWNER TO, RENAME TO and SET SCHEMA, but not SET as for
> tables. When manually entered, the autocompletion options are the same as if
> SET was entered as a command.

Yeah, it would be more portable to hint first to SET, and then match
with the other keywords, like WITHOUT, TABLESPACE, SCHEMA, etc. And
actually ALTER MATVIEW SET does not hint correctly as well. See for
example the patch attached that improves a bit the situation. Note
that "SET (" does not hint to the list of parameters, we may want to
add some more stuff for the equivalent portion in ALTER TABLE SET, not
sure that's worth it...
--
Michael

Attachment Content-Type Size
20151214_psql_tab_alter_matview.patch binary/octet-stream 1.0 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message sienkomarcin 2015-12-14 11:29:32 BUG #13816: Query planner strange choose while select/count small part of big table
Previous Message johannes 2015-12-13 19:32:46 BUG #13814: missing command in psql autocompletion