Re: Discussion: psql \et -> edit the trigger function

Поиск
Список
Период
Сортировка
От Dagfinn Ilmari Mannsåker
Тема Re: Discussion: psql \et -> edit the trigger function
Дата
Msg-id 87r0rotaqx.fsf@wibble.ilmari.org
обсуждение исходный текст
Ответ на Discussion: psql \et -> edit the trigger function  (Kirk Wolak <wolakk@gmail.com>)
Список pgsql-hackers
Kirk Wolak <wolakk@gmail.com> writes:

> We already have
> \ef
> \ev
>
> The use case here is simply that it saves me from:
> \d <table>
> [scroll through all the fields]
> [often scroll right]
> select function name
> \ef [paste function name]
>
> and tab completion is much narrower

I think it would make more sense to model it on the filtering letters
available for \df:

  \df[anptw][S+] [FUNCPTRN [TYPEPTRN ...]]
       list [only agg/normal/procedure/trigger/window] functions


I just noticed that tab completion after e.g. \dft does not take the
function type restriction into account, so the solution for \ef<letters>
should be made to work for both. I wonder if it would even be possible
to share the tab completion filtering conditions with the actual
implementation of \df.

Also, I notice that \df only tab completes functions (i.e. not
procedures), although it actually returns all routines.

> When doing conversions and reviews all of this stuff has to be reviewed.
> Oftentimes, renamed, touched.
>
> I am 100% willing to write the code, docs, etc. but would appreciate
> feedback.

I'm happy to assist with and review at least the tab completion parts of
this effort.

> Kirk...

- ilmari



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Discussion: psql \et -> edit the trigger function
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] Use RelationClose rather than table_close in heap_create_with_catalog