WL#3005: Editing stored procedures in $EDITOR
Affects: WorkLog-3.4 — Status: Un-Assigned — Priority: Medium
I was in class with Harrison and getting frustrated that I editing stored procedures in the command line client was so clunky. I was wondering why something like \e wouldn't work to pop the stored procedure text into the $EDITOR, and Harrison suggested I just write it. So I took a stab at it and have something that's mostly workable for me. I think it could still be better, but I imagine I should start getting some input before I go TOO far. I've attached a patch that implements this: - Adds a command, editproc with a shortcut \E that operates like: \E procname - If the proc exists: pulls the text of the proc into the $EDITOR using the same rules as \e - If it doesn't exist: puts template text into the $EDITOR - When the editor is exited, editproc runs a drop proc and then the new proc code. - If there is an error in the new proc creation, the old proc is re-run back in The big remaining question mark for me is what to do with invalid code that the user edits? One wouldn't want to lose changes just for a syntax error - or that could just be a caveat of the feature. Anyway, it works for me at the moment - although I haven't gone through the code style guidelines because I haven't had intranet access since I started working on this. (That's fixed now)
Copyright (c) 2000, 2015, Oracle Corporation and/or its affiliates. All rights reserved.