psql, tab completion additions

Поиск
Список
Период
Сортировка
Искать

psql, tab completion additions

От:
"Sergey E. Koposov" <math@sai.msu.ru>
Дата:
Вложения:
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 (

drop FUNCTION strpos (text, text)

or:

wsdb=# drop FUNCTION length (      
bit)        bytea)      character)  lseg)       path)       text)

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 

wsdb# CREATE INDEX xxx on q3c ( 

wsdb=# CREATE INDEX xxx on q3c ( 
"dec"  ipix   ra     

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@sai.msu.ru

Re: psql, tab completion additions

От:
"Sergey E. Koposov" <math@sai.msu.ru>
Дата:
Вложения:

Now the patch have been made using "cvs diff -c" 

Sergey

On Tue, 29 Nov 2005, Sergey E. Koposov wrote:

> 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 (
> 
> drop FUNCTION strpos (text, text)
> 
> or:
> 
> wsdb=# drop FUNCTION length (      
> bit)        bytea)      character)  lseg)       path)       text)
> 
> 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 
> 
> wsdb# CREATE INDEX xxx on q3c ( 
> 
> wsdb=# CREATE INDEX xxx on q3c ( 
> "dec"  ipix   ra     
> 
> 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@sai.msu.ru
> 
> 

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

Re: psql, tab completion additions

От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:

Previous version replaced.

Your patch has been added to the PostgreSQL unapplied patches list at:

	http://momjian.postgresql.org/cgi-bin/pgpatches

It will be applied as soon as one of the PostgreSQL committers reviews
and approves it.

---------------------------------------------------------------------------


Sergey E. Koposov wrote:
> 
> Now the patch have been made using "cvs diff -c" 
> 
> Sergey
> 
> On Tue, 29 Nov 2005, Sergey E. Koposov wrote:
> 
> > 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 (
> > 
> > drop FUNCTION strpos (text, text)
> > 
> > or:
> > 
> > wsdb=# drop FUNCTION length (      
> > bit)        bytea)      character)  lseg)       path)       text)
> > 
> > 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 
> > 
> > wsdb# CREATE INDEX xxx on q3c ( 
> > 
> > wsdb=# CREATE INDEX xxx on q3c ( 
> > "dec"  ipix   ra     
> > 
> > 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@sai.msu.ru
> > 
> > 
> 
> *****************************************************
> Sergey E. Koposov
> Max-Planck Institut for Astronomy
> Web: http://lnfm1.sai.msu.ru/~math 
> E-mail: math@sai.msu.ru
>  

Content-Description: 

[ Attachment, skipping... ]

> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that your
>        message can get through to the mailing list cleanly

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

Re: psql, tab completion additions

От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:

Patch applied to CVS HEAD only.  Thanks.

---------------------------------------------------------------------------


Sergey E. Koposov wrote:
> 
> Now the patch have been made using "cvs diff -c" 
> 
> Sergey
> 
> On Tue, 29 Nov 2005, Sergey E. Koposov wrote:
> 
> > 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 (
> > 
> > drop FUNCTION strpos (text, text)
> > 
> > or:
> > 
> > wsdb=# drop FUNCTION length (      
> > bit)        bytea)      character)  lseg)       path)       text)
> > 
> > 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 
> > 
> > wsdb# CREATE INDEX xxx on q3c ( 
> > 
> > wsdb=# CREATE INDEX xxx on q3c ( 
> > "dec"  ipix   ra     
> > 
> > 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@sai.msu.ru
> > 
> > 
> 
> *****************************************************
> Sergey E. Koposov
> Max-Planck Institut for Astronomy
> Web: http://lnfm1.sai.msu.ru/~math 
> E-mail: math@sai.msu.ru
>  

Content-Description: 

[ Attachment, skipping... ]

> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that your
>        message can get through to the mailing list cleanly

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