Re: review: psql: edit function, show function commands patch
Dimitri Fontaine <dfontaine@hi-media.com>
From: Dimitri Fontaine <dfontaine@hi-media.com>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Jan Urbański <wulczer@wulczer.org>, Postgres - Hackers <pgsql-hackers@postgresql.org>
Date: 2010-07-21T21:04:18Z
Lists: pgsql-hackers
Attachments
- dim-pgsql.el (application/emacs-lisp)
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