Re: inconsitent tab completion in psql

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: inconsitent tab completion in psql
Date: 2005-01-23 16:01:14
Message-ID: 200501231601.j0NG1EI00597@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Robert Treat wrote:
> Disclaimer that this was found under RC1 so it might have been fixed in final
> release, though I don't recall it being reported, anyway, the problem is that
> tab completion does not seem to work for "\h alter operator class".
>
> template1=# \h ALTER
> AGGREGATE DOMAIN INDEX SCHEMA TABLESPACE USER
> CONVERSION FUNCTION LANGUAGE SEQUENCE TRIGGER
> DATABASE GROUP OPERATOR TABLE TYPE
> template1=# \h ALTER OPERATOR
>
> template1=# \h ALTER OPERATOR CL
>
> template1=# \h ALTER OPERATOR CLASS
> Command: ALTER OPERATOR CLASS
> Description: change the definition of an operator class
> Syntax:
> ALTER OPERATOR CLASS name USING index_method RENAME TO newname
> ALTER OPERATOR CLASS name USING index_method OWNER TO newowner
>
> template1=#

The reason this happens is because both ALTER OPERATOR and ALTER
OPERATOR CLASS are supported so for the third word you would have to do
tab complete only when the C-L-A-S-S is unique. I suppose you could say
as soon as they type 'C' it can't match an operator name but it hardly
seems worth the complexity.

> I noticed another other issues too, like CREATE CONSTRAINT TRIGGER doesnt show
> up when you do \h CREATE<tab><tab> and when you do \h CREATE CON<tab><tab>
> you get CREATE CONVERSION instead.

CREATE CONSTRAINT TRIGGER is not supported because it is designed to be
used only by pg_dump and is not for general use. I added a source file
comment mentioning why we don't support tab completion for it.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2005-01-23 17:01:34 Re: inconsitent tab completion in psql
Previous Message Yary Hluchan 2005-01-23 08:57:07 BUG #1435: Optimizer not using index on large tables when inner joining two views