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

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: proposal: more practical view on function's source code
Дата
Msg-id 162867791003212053l34cef5f1k6e3178f77aaeca96@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal: more practical view on function's source code  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
2010/3/21 Tom Lane <tgl@sss.pgh.pa.us>:
> Robert Haas <robertmhaas@gmail.com> writes:
>> I'm not sure that Pavel's idea is the right way to attack the problem,
>> but I don't agree with this either.  Line numbers are really the only
>> feasible way of identifying a position in a large function.  I usually
>> bring up the function source code in vi and then use j with a repeat
>> count to find the offending line.  It's not uncommon for me to have
>> various places in the function that look somewhat similar, so
>> expecting me to find the right place other than by the line number
>> would not work very well for me.
>
> I'm certainly not proposing removing the line number from error
> messages.  I'm just saying that I see no value in the proposed psql \df
> change for this purpose.
>
> The direction that we ought to be pushing in, I think, is the same as
> the vision for syntax error handling: enable pgAdmin and similar tools
> to pop up the function text with a cursor placed at (more or less) the
> right place.  It's interesting to think about how that might be extended
> to lower-tech solutions like \ef.  I could see telling people to type
>        \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?

Uff, why?

- almost of time you don't need, you must not edit directly code of procedures.
- startup time of text processor
- this function will start on some specific editor, but pg allows to
set any external editor
- it isn't effective - really (I think it is too much chars). I prefer
two or three chars shortcut

Pavel
>
>                        regards, tom lane
>


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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: 9.0 release notes done
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: proposal: more practical view on function's source code