Skip site navigation (1) Skip section navigation (2)

psql, tab completion additions

From: "Sergey E(dot) Koposov" <math(at)sai(dot)msu(dot)ru>
To: pgsql-patches(at)postgresql(dot)org
Subject: psql, tab completion additions
Date: 2005-11-29 03:40:11
Message-ID: Pine.LNX.4.44.0511290353030.3502-200000@lnfm1.sai.msu.ru (view raw or flat)
Thread:
Lists: pgsql-patches
Hello All, 

1) I'm proposing a patch to do the DROP FUNCTION argument tab completion.
Now, the arguments of the drop function can be tab completed. for example

drop function strpos (
<press tab>
drop FUNCTION strpos (text, text)

or:

wsdb=# drop FUNCTION length (      
bit)        bytea)      character)  lseg)       path)       text)
<press c>
wsdb# DROP FUNCTION length ( character) 

I think that this patch should be rather useful. At it least I hate 
always to type all the arguments of the dropped functions.

2) Also some fixes applied for the 
CREATE INDEX syntax

now the parenthesises are inserted by tab pressing. 
suppose I have the table q3c:
wsdb=# \d q3c
          Table "public.q3c"
 Column |       Type       | Modifiers 
--------+------------------+-----------
 ipix   | bigint           | 
 ra     | double precision | 
 dec    | double precision | 

Now if I do 
wsdb# create index xxx on q3c 
<press tab>
wsdb# CREATE INDEX xxx on q3c ( 
<press tab>
wsdb=# CREATE INDEX xxx on q3c ( 
"dec"  ipix   ra     
<press r>
wsdb=# CREATE INDEX xxx on q3c ( ra 

Regards,
        Sergey

*****************************************************
Sergey E. Koposov
Max-Planck Institut for Astronomy
Web: http://lnfm1.sai.msu.ru/~math 
E-mail: math(at)sai(dot)msu(dot)ru


Attachment: tab-complete.diff
Description: text/plain (2.6 KB)

Responses

pgsql-patches by date

Next:From: Tom LaneDate: 2005-11-29 06:16:53
Subject: Re: Reduce dependancies of postmaster (without --as-needed)
Previous:From: Alvaro HerreraDate: 2005-11-29 01:48:29
Subject: Re: Install pg_regress by default

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group