![]() ![]() The first thing to know is that Docker for Desktop sets as a magic hostname inside the container that refers back to the IP address of the host machine. In order to test those containers on my laptop, I needed to figure out a way to set a DATABASE_URL that would point to the PostgreSQL I have running on my own laptop - so that I didn't need to spin up another PostgreSQL Docker container just for testing purposes. When I deploy applications to Fly.io I build them as Docker containers and inject the Fly PostgreSQL database details as a DATABASE_URL environment variable. I use it for a bunch of different projects. I like using Postgres.app to run PostgreSQL on my macOS laptop. Simon Willison’s TILs Allowing a container in Docker Desktop for Mac to talk to a PostgreSQL server on the host machine If you have Dash installed, you can use the command "Look Up In Dash" in the context menu or press Ctrl-H to look up the current word (or selection) in Dash.Allowing a container in Docker Desktop for Mac to talk to a PostgreSQL server on the host machine | Simon Willison’s TILs Use the command "Shift Left" in the "Edit" menu or press ⇧⇥ or ⌘[ to shift the selected line(s) to the left (decrease indentation). Use the command "Shift Right" in the "Edit" menu or press ⇥ or ⌘] to shift the selected line(s) to the right (increase indentation). Multiple selected lines can be indented at once. Multiple matches of the same suggestion will be grouped by type, use the left and right arrow keys to expand and collapse grouped suggestions. In the autocompletion window, use the arrow keys to select a completion, then hit the return key to confirm. You can also trigger autocomplete using the command "Show Completions" in the "Edit" menu. you are trying to "complete" a whitespace character). This mode can even be used if there is no word (e.g. Press Ctrl-Space or ESC, and Postico shows a list of all possible completions in a popup window, including additional matches related to the word you have typed. We tried to make the behaviour similar to tab completion in command-line tools like psql and bash. ![]() Press Tab again to display a list of possible completions in a popup window. When multiple completions are possible, you hear a beep. Tab Completion: Press Tab, and Postico automatically tries to complete the word you are typing.There are two autocomplete modes available in the SQL query view. To clear the result area, use the command "Clear Results" in the "Connection" menu or press ⌘K. Use the command "Execute All Queries" in the "Connection" menu or ⌥⌘↩︎ to execute all statements at once. You can switch between results using a popup menu button at the bottom left. When you execute multiple statements, Postico will display the first result. They will be executed in an implicit transaction, so if one of the statements fails, all changes to the database will be rolled back. You can execute multiple statements at once by selecting them. The corresponding results are displayed below the text view. Use the command "Execute Query" in the "Connection" menu or press ⌘↩︎ to execute the current statement (or the current selection, if any). ![]() ![]() The query view highlights the current statement in light grey. There's also a keyboard shortcut (⇧⌘T) to navigate to the query view. You can get to the SQL Query View by clicking on "SQL Query" in the sidebar. You are looking at the documentation for Postico v1.3.1 - would you like to go to the latest version instead? Using the SQL Query ViewĬustom database queries can be executed from the SQL Query view in Postico. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |