Closed atiris closed 5 months ago
As far as I'm concerned, being able to execute the current query (where the cursor is positioned) is an essential and indispensable feature. It's because of this lack that I regularly switch to the CloudBeaver editor, even though it's less complete than PGAdmin.
I'd like to chime in and support this feature's development. It's one of the features I like most about DataGrip and would love to see happen in pgAdmin as well.
@anthonydb Sure you can. But may be wait for one in progress upgrade of CodeMirror 5 to 6 - the UI editor library. Once done, it will be easy for you to parse the queries separated by semi-colon.
Tested feature on candidate build with both provided test cases and additional ones, is working as expected.
Env: OS - macOS Sonoma 14.4.1 Mode - Desktop
Describe the bug
Currently, pgAdmin does not provide any functionality that could be called Execute query.
Although the keyboard shortcuts section contains "Execute query" option, using this shortcut will not actually run the query. Instead, the entire script is executed (all queries listed in the editor, regardless of which query is currently edited). It is possible to select a block and run the given block of code, but this is not "Execute query" in the sense in which it is understood by standard. Such behavior is usually called "Execute script" or "Execute selection".
Since the function to run an active query, I working on (either selected by marking the given text of this query or the one on which the cursor is currently placed) is essential for the sql editor, I rate it as a bug, not as a feature request.
Please don't reject this request just by sticking to historical decisions If you do not agree that this is a bug, then at least change the status of this request to a feature request and assign it a low priority. After all, the addition of new functionality won't certainly cause any harm and will definitely help some users.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
As the name of this functionality says, a (single / active) query should be executed.
Desktop (please complete the following information):
Additional context
Clone from redmine.postgresql.org issue 7885 as I don't know which place to report the error is correct.