HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Keyboard shortcut to execute statement at cursor in pgAdmin

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
pgadminstatementshortcutkeyboardexecutecursor

Problem

In MySQL Workbench, one can use the keyboard shortcut Ctrl + ENTER to execute the statement at cursor (delineated with semi colons).

Is there a similar shortcut in pgAdmin?

For SQL queries that span on only one line, I use a voice command in Dragon NaturallySpeaking:

Sub Main
    SendKeys "{End}"
    Wait(0.3)
    SendKeys "+{Home}"
    Wait(0.3)
    SendKeys "{F5}"
End Sub


but I don't have any solution for SQL queries that span although more than one line.

Solution

Since there seems to be no way to define such a keyboard shortcut, I filed a feature request: https://redmine.postgresql.org/issues/1439 , which got rejected:

​Issue #1439 has been updated by Dave Page.

Status changed from New to Rejected

We follow the pgAdmin 3 behaviour in this regard - when you execute a query (or explain etc), if any text is selected, only that text is executed. If nothing is selected, the entire query (or set of queries) are executed.

Since amazingly with pgAdmin one has to login to view issues / feature request, here is a screenshot:

Context

StackExchange Database Administrators Q#120380, answer score: 8

Revisions (0)

No revisions yet.