Pavel Stehule <pavel.steh...@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

Attachment: dim-pgsql.el
Description: pgsql setup for emacs

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to