Query Tool Toolbar - pgAdmin 4 4.18 documentation
The Query Tool toolbar uses context-sensitive icons that provide shortcuts to frequently performed tasks. If an icon is highlighted, the option is enabled; if the icon is grayed-out, the task is disabled.
Note
The Query Tool and View/Edit Data tools are actually different operating modes of the same tool. Some controls will be disabled in either mode.
![Query tool toolbar](images/query_toolbar.png)
Hover over an icon in pgAdmin to display a tooltip that describes the icon’s functionality.
File Options ¶
Icon | Behavior | Shortcut |
---|---|---|
Open File | Click the Open File icon to display a previously saved query in the SQL Editor. | Accesskey + O |
Save File |
Click the Save icon to perform a quick-save of a previously saved query, or to access the Save menu:
|
Accesskey + S |
Editing Options ¶
Icon | Behavior | Shortcut |
---|---|---|
Save Data Changes | Click the Save Data Changes icon to save data changes (insert, update, or delete) in the Data Output Panel to the server. | F6 |
Find | Use the Find menu to search, replace, or navigate the code displayed in the SQL Editor: | |
Select Find to provide a search target, and search the SQL Editor contents. | Cmd+F | |
Select Find next to locate the next occurrence of the search target. | Cmd+G | |
Select Find previous to move to the last occurrence of the search target. | Cmd+Shift+G | |
Select Persistent find to identify all occurrences of the search target within the editor. | ||
Select Replace to locate and replace (with prompting) individual occurrences of the target. | Cmd+Shift+F | |
Select Replace all to locate and replace all occurrences of the target within the editor. | ||
Select Jump to navigate to the next occurrence of the search target. | Alt+G | |
Copy |
Click the Copy icon to copy the content with or without header:
|
Accesskey + C |
Paste | Click the Paste icon to paste a previously copied row into a new row. | Accesskey + P |
Delete | Click the Delete icon to mark the selected rows for deletion. These marked rows get deleted when you click the Save Data Changes icon. | Accesskey + D |
Edit | Use options on the Edit menu to access text editing tools; the options operate on the text displayed in the SQL Editor panel when in Query Tool mode: | |
Select Indent Selection to indent the currently selected text. | Tab | |
Select Unindent Selection to remove indentation from the currently selected text. | Shift+Tab | |
Select Inline Comment Selection to enclose any lines that contain the selection in SQL style comment notation. | Cmd+/ | |
Select Inline Uncomment Selection to remove SQL style comment notation from the selected line. | Cmd+. | |
Select Block Comment to enclose all lines that contain the selection in C style comment notation. This option acts as a toggle. | Shift+Cmd+/ |
View/Edit Data Resultset Control ¶
Icon | Behavior | Shortcut |
---|---|---|
Filter |
Click the Filter icon to set filtering and sorting criteria for the data when in View/Edit data mode. Click the down arrow to access other filtering and sorting options:
|
Accesskey + F |
Limit Selector | Select a value in the Limit Selector to limit the size of the dataset to a number of rows. | Accesskey + R |
Stop | Click the Stop icon to cancel the execution of the currently running query. | Accesskey + Q |
Query Execution ¶
Icon | Behavior | Shortcut |
---|---|---|
Execute/Refresh |
Click the Execute/Refresh icon to either execute or refresh the query highlighted in the SQL editor panel. Click the down arrow to access other execution options:
|
F5 |
Explain | Click the Explain icon to view an explanation plan for the current query. The result of the EXPLAIN is displayed graphically on the Explain tab of the output panel, and in text form on the Data Output tab. | F7 |
Explain analyze |
Click the Explain analyze icon to invoke an EXPLAIN ANALYZE command on the current query. Navigate through the Explain Options menu to select options for the EXPLAIN command:
|
Shift+F7 |
Commit | Click the Commit icon to commit the transaction. | Shift+CTRL+M |
Rollback | Click the Rollback icon to rollback the transaction. | Shift+CTRL+R |
Clear |
Use options on the Clear drop-down menu to erase display contents:
|
Accesskey + L |
Download as CSV | Click the Download as CSV icon to download the result set of the current query to a comma-separated list. You can specify the CSV settings through Preferences -> SQL Editor -> CSV output dialogue. | F8 |