Re: review: psql: edit function, show function commands patch

Поиск
Список
Период
Сортировка
От Dimitri Fontaine
Тема Re: review: psql: edit function, show function commands patch
Дата
Msg-id m2r5iwv965.fsf@hi-media.com
обсуждение исходный текст
Ответ на Re: review: psql: edit function, show function commands patch  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes:
> ****  CREATE OR REPLACE FUNCTION public.foo()
> ****   RETURNS integer
> ****   LANGUAGE plpgsql
>    1  AS $function$ begin
>    2  return 10/0;
>    3  end;
> ****  $function$
>
> This is very trivial example - for more complex functions, the correct
> line numbering is more useful.

I completely agree with this, in-functions line numbering is a
must-have. I'd like psql to handle that better.

That said, I usually edit functions in Emacs on my workstation. I did
implement a linum-mode extension to show PL/pgSQL line numbers in
addition to the buffer line numbers in emacs, but it failed to work with
this "AS $function$ begin" on the same line example. It's fixed in the
attached, should there be any users of it.

Regards,
--
dim


Вложения

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: documentation for committing with git
Следующее
От: Dimitri Fontaine
Дата:
Сообщение: Re: managing git disk space usage