Re: proposal: more practical view on function's source code

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: proposal: more practical view on function's source code
Дата
Msg-id 162867791003230058g69017d7eqac1cd9d845ed4a4d@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal: more practical view on function's source code  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Modification of proposal:

I think so from discussion can take some two points:

a) enhancing editing

\ef funcname, line  ... edit function and move cursor on line
\ef                        ... edit function - name and line take from
error message

b) enhancing view

\sf funcname         ... show function source code without any
decorations - good for copy/paste
\sf+ funcname       ... show function and add line numbers, maybe
others in future
\sf+ funcname, line ... show function from line
\sf                         ... show function - name and line take
from error message

+ add new system variable PG_EDITOR_OPTION ??

what do you think about?

Regards
Pavel

2010/3/22 Peter Eisentraut <peter_e@gmx.net>:
> On sön, 2010-03-21 at 20:40 -0400, Robert Haas wrote:
>> >        \ef function-name line-number
>> > with suitable magic to get the editor to place the cursor at that line.
>> > I suspect this wouldn't be too hard to do with emacs --- what do you
>> > think about vi?
>>
>> Well, in vi you can just do "vi +linenum filename".
>
> I think that's a pretty widely spread convention.  A quick test shows
> that all of emacs, vi, joe, and nano support this.  Of course there are
> editors that don't support it, so we'll have to distinguish that
> somehow, but it won't be too complicated to support a few of the common
> editors.
>
>
>


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

Предыдущее
От: Nicolas Barbier
Дата:
Сообщение: Re: WIP: preloading of ispell dictionary
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: WIP: preloading of ispell dictionary