It would be better to execute "Explain current query" (F9) regarding current selection. Now it always tries to explain query of whole script. So I have to mark, copy selection out of procedure script, paste it into new window and only there F9 explains it. Explain the selection, if something selected, or the whole script, if there's no selection.
"Explain current query" for selection
It is true. It's just different understanding, what is "query at the cursor". In fact, I was wrong about "whole script". On F9 it finds the starting point of current query back from current cursor position. And there may be no marked text selection or some text marked as selection. Both cases it finds starting point. It "create procedure " in my case. What I want is to explain the query, I selected/marked as text fragment. By the way, F10 grabs that selection properly. So I want same as F10, but explain, not execute.
Well, I'm writting the code of procedure. I have dozen of queries inside. I can mark one and execute it with F10. And it works. But if I marked it and pressed F9, what do you think I expect as an output? Certainly not explaining the statement "create procedure". I think it would be more intuitive to estimate the presence of not empty selection in text (or marked text) and use it as desired content for execution or explanation. In fact I was a bit surprised by existance of separate shortcuts (F5 and F10) for execution. If I mark certain text and press F5, I would expect that this selection would be executed, not the whole script. I'd prefer such a behavior. But if you think that's some kind of weird request, I'm OK with that. Maybe I'm seeking for too easy living. :)
Please login to leave a reply, or register at first.