AI 보조 패널이 포함된 PgAdmin 4 9.13

hackernews | | 💼 비즈니스
#ai #pgadmin4 #query tool #sql #tip #데이터베이스 #ai 보조 #pgadmin 4 #팁
원문 출처: hackernews · Genesis Park에서 요약 및 분석

요약

해당 기사는 PgAdmin의 쿼리 도구에 대한 상세한 기능과 사용법을 설명하고 있습니다. 상단의 SQL 에디터 패널에서는 자동 완성과 구문 강조를 지원하여 쿼리를 작성 및 실행할 수 있으며, 자연어로 SQL을 생성하는 AI 어시스턴트 탭도 함께 제공됩니다. 하단의 출력 패널에서는 쿼리 결과를 확인하고 CSV 파일로 저장하거나 실행 계획을 텍스트 및 그래픽 형태로 분석할 수 있습니다. 특히 워크스페이스 레이아웃을 사용하면 기존에 등록되지 않은 임의의 서버에도 손쉽게 접속하여 즉각적으로 SQL 작업을 수행할 수 있습니다.

본문

Contents The Query Tool is a powerful, feature-rich environment that allows you to execute arbitrary SQL commands and review the result set. You can access the Query Tool via the Query Tool menu option on the Tools menu, or through the context menu of select nodes of the Object explorer control. The Query Tool allows you to: Issue ad-hoc SQL queries. Execute arbitrary SQL commands. Edit the result set of a SELECT query if it is updatable. Displays current connection and transaction status as configured by the user. Save the data displayed in the output panel to a CSV file. Review the execution plan of a SQL statement in either a text, a graphical format or a table format (similar to https://explain.depesz.com). View analytical information about a SQL statement. You can open multiple copies of the Query tool in individual tabs simultaneously. To close a copy of the Query tool, click the X of the tab. The Query Tool features two panels: The upper panel displays the SQL Editor. You can use the panel to enter, edit, or execute a query or a script. It also shows the History tab which can be used to view the queries that have been executed in the session, a Scratch Pad which can be used to hold text snippets during editing, and an AI Assistant tab for generating SQL from natural language (when AI is configured). If the Scratch Pad is closed, it can be re-opened (or additional ones opened) by right-clicking in the SQL Editor and other panels and adding a new panel. The lower panel displays the Data Output panel. The tabbed panel displays the result set returned by a query, information about a query’s execution plan, server messages related to the query’s execution and any asynchronous notifications received from the server. Query Tool in Workspace Layout¶ The workspace layout offers a distraction-free, dedicated area for the Query Tool. When the Query Tool workspace is accessed, the Welcome page opens by default. Note: In the Workspace layout, all Query Tool and View/Edit Data tabs open within the Query Tool workspace. In the classic UI, users must connect to a database server and navigate to the database node before using the Query Tool. However, with the introduction of the Workspace layout and Welcome page, users can seamlessly connect to any ad-hoc server, even if it is not registered in the Object Explorer. Select Existing Server from the dropdown to connect to a server already listed in the Object Explorer. It is optional. Provide the Server Name for ad-hoc servers. Specify the IP address of the server host, or the fully qualified domain name in the Host name/address field. Enter the listener port number of the server host in the Port field. Use the Database field to specify the name of the database to which the client will connect. Use the User field to specify the name of a user that will be used when authenticating with the server. Use the Password field to provide a password that will be supplied when authenticating with the server. Use the Role field to specify the name of a role that has privileges that will be conveyed to the client after authentication with the server. Use the Service field to specify the service name. For more information, see Section 33.16 of the Postgres documentation. Use the fields in the Connection Parameters to configure the connection parameters. After filling in all the required fields, click the Connect & Open Query Tool button to launch the Query Tool with the provided server details. If the password is not supplied, you will be prompted to enter it. Toolbar¶ The toolbar is described in the following subsections. The SQL Editor Panel¶ The SQL editor panel is a workspace where you can manually provide a query, copy a query from another source, or read a query from a file. The SQL editor features syntax coloring and autocompletion. To use autocomplete, begin typing your query; when you would like the Query editor to suggest object names or commands that might be next in your query, press the Control+Space key combination. For example, type “SELECT * FROM” (without quotes, but with a trailing space), and then press the Control+Space key combination to select from a popup menu of autocomplete options. After entering a query, select the Execute script icon from the toolbar. The complete contents of the SQL editor panel will be sent to the database server for execution. To execute only a section of the code that is displayed in the SQL editor, highlight the text that you want the server to execute, and click the Execute script icon. You can also execute a query based on cursor position. Query tool will detect a query and underline it when cursor position changes. Now, to execute the current underlined query, hit the Execute query button on the toolbar. If a section is highlighted then it will behave like normal execute. The warning will appear only if Underline query at cursor? is set to False and the Underlined query execute warning? switch is set to True Preferences Query tool

Genesis Park 편집팀이 AI를 활용하여 작성한 분석입니다. 원문은 출처 링크를 통해 확인할 수 있습니다.

공유

관련 저널 읽기

전체 보기 →