Under Windows, it would be \AppData\Local\dbcli\pgcli\config, unless a different location is set in XDGCONFIGHOME environment variable. if you wonder what pgcli is, its simlary client for postgres with additional features like, auto completion of tables, selecting columns, or psql options (\?) based on the context.ÄevInfo It worked In: Mac, psql (PostgreSQL) version 9.4.4, pgcli Version: 0.19. If it's already the latest, take a look at your pgcli config file. One More cool thing i found was we can set the editor for psql and we can edit the last query, (its hard to use history and edit in pasted manner) set PSQL_EDITOR=vi #or whatever editor you like (emacs, sublime.) then /e #opens the editor with last query :) These meta-commands start with the backslash character. The default is to fold long lines that is, display the remainder on the next line.Ī sample horizontal output from the table: select * from pg_type Pgcli has implemented most of the meta-commands that are supported by psql. That is, the portion of a long line that does not fit in the screen width is not shown. Ive installed pgcli successfully and when I run it on windows 10, I run using: pgcli -h localhost -p 5000 -U arun testdb. # -S flag is important as it says less not to fold lines.Ĭauses lines longer than the screen width to be chopped rather than folded. Generally, use \ command to invoke command from current console (cmd.exe). Awesome! (you can add it in your ~/.bashrc or ~/.zshrc file) alternatively you can pass the variable while invoking the psql or other clients: Really does the magic and doesnât fold lines and shows me the record with horizontal scroll view. There are four alternatives to Pgcli for Linux, Mac, Windows, MariaDB and MySQL Community Edition. Thereâs an Environment Variable available for modifying the table view. Pgcli is described as Python-based command line interface for Postgres with auto-completion and syntax highlighting and is an app in the os & utilities category. Windows-10-3-SP0 Python 3.10.4 Installer: MSI azure-cli 2.37.0 Extensions: rdbms-connect 1.0.2 Dependencies: msal 1.18.0b1 azure-mgmt-resource 21.1. Because there's currently issues with python-prompt-toolkit in windows with python 3, I have a second pgcli python 2.7 virtual environment called pgcli2 that I use to run the command prompt. I have one pgcli python 3.3 virtual environment called pgcli3. The above also wonât help much if i have too many records. First, search and click Edit the system environment variables as shown below: Then, click Environment Variables as shown below: Lastly, set C:Program FilesPostgreSQLbin to Path either in User variables or System variables or both as shown below. Here is the configuration I use in windows.\x # This option helpes to display in vertical fashion. I have a table that i want to lookup in psql client (I really donât like heavy weight tools eg:sqldeverloper, oracle etc.) The problem is table is huge is and its folded and shown, the columns and its record values is hard to map.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |