Re: [HACKERS] psql: edit function, show function commands patch

2010-03-31 Thread Pavel Stehule
2010/4/1 Bruce Momjian : > > I have added this to the next commit-fest. > thank you Pavel > --- > > Pavel Stehule wrote: >> Hello >> >> this simple patch allow to specify cursor row when some function is >> opened in editor. >

Re: [HACKERS] psql: edit function, show function commands patch

2010-03-31 Thread Bruce Momjian
I have added this to the next commit-fest. --- Pavel Stehule wrote: > Hello > > this simple patch allow to specify cursor row when some function is > opened in editor. > > \e aaa.txt > \a aaa.txt 3 ... move cursor on 3nd l

[HACKERS] psql: edit function, show function commands patch

2010-03-29 Thread Pavel Stehule
Hello this simple patch allow to specify cursor row when some function is opened in editor. \e aaa.txt \a aaa.txt 3 ... move cursor on 3nd line of text \ef foo \ef foo 3 ... move cursor on 3nd line of function body \sf foo ... show function body \sf+ foo ... show function body - use line numbers

Re: [HACKERS] psql: \edit-function

2008-06-15 Thread Abhijit Menon-Sen
At 2008-06-15 23:35:34 -0400, [EMAIL PROTECTED] wrote: > > There's been a lot of talk (but no action) about refactoring pg_dump > into a library plus wrapper. Yes. After having tried to do what would have amounted to just a small part of that work, I can see why nobody has done it yet. > I'd much

Re: [HACKERS] psql: \edit-function

2008-06-15 Thread Tom Lane
Abhijit Menon-Sen <[EMAIL PROTECTED]> writes: > The problem is, of course, generating the "CREATE OR REPLACE" statement. > There is some code to do this in pg_dump.c:dumpFunc(), but it's strongly > tied to pg_dump (global variables, output to Archive *, dependencies on > other functions, etc.). >

[HACKERS] psql: \edit-function

2008-06-15 Thread Abhijit Menon-Sen
Hi. I'm working on a patch where if you say "\ef foo" in psql, it'll start $EDITOR with a "CREATE OR REPLACE FUNCTION" statement to recreate the function. So you edit and save and quit, and if you made any changes, psql will execute the statement. The psql(/command.c) parts of this are quite simp