Refreshes the cached auto-completion data. See the pager section of the documentation.Ĭhange the prompt format. Specify a command that will be used as the pager. For more information, see theĮnable the use of a pager for outputting query results. For moreĭisables the output to the tee file. Will be set as the default database for your connection.ĭisplay a help message listing mycli's commands.ĭisable the use of pager software for outputting query results. You can optionally supply a database name that Toggle whether or not the time it takes to execute a statement is displayed Use -o to overwrite any existing file content. Output the next query's results to an output file. List the databases on the MySQL server host. See Favorite Queries for more information. Favorite queries support shell-style parameter They can be passed to the query after the name, e.g., \f users_by_name If the favorite query requires parameters, If this is entered without a current query, it will populate the editor Įdit the current statement with an editor (uses the environment variable $EDITOR). The \dt commands are equivalent to running SHOW TABLES, SHOW COLUMNS FROM The optional + verbose indicator can be used to toggle whether or not the CREATE TABLE statement for the table is shown. List the tables in the default database (when used without any parameters).ĭescribe a table (when passed a parameter). This is used instead of a semicolon terminator, e.g. Send the current statement to the server and display the results vertically. Commands may be followed by an optional semicolon. Most commands have a long and short form. | | watch | watch query | Executes the query every seconds ( by default 5 ). | | use | \ u | Change to a new database. | | tee | tee filename | Append all results to an output file ( overwrite using - o ). | | tableformat | \ T | Change the table format used to output results. | | system | system | Execute a system shell commmand. | | status | \ s | Get status information from the server. | | rehash | \# | Refresh auto - completions. | | notee | notee | Stop writing results to an output file. | | nopager | \ n | Disable pager, print to stdout. | | connect | \ r | Reconnect to the database. | | \ timing | \ t | Toggle timing of commands. | | \ once | \ o filename | Append next result to an output file ( overwrite using - o ). | | \ fs | \ fs name query | Save a favorite query. | | \ fd | \ fd | Delete a favorite query. | | \ f | \ f ] | List or execute favorite queries. | | \ e | \ e | Edit command with editor ( uses $ EDITOR ). | | \ dt | \ dt | List or describe tables. PGHOST, PGPORT, PGUSER, PGPASSWORD, PGDATABASE).Mycli > help + -+-+-+ | Command | Shortcut | Description | + -+-+-+ | \ G | \ G | Display current query results vertically. Pgcli also supports many of the same environment variables as psql for login options (e.g. warn / -no-warn Warn before running a destructive query. auto-vertical-output Automatically switch to vertical output mode if the result is wider than the terminal width. l, -list list available databases, then exit. prompt-dsn TEXT Prompt format for connections using DSN aliases (Default: " ). prompt TEXT Prompt format (Default: " ). less-chatty Skip intro on startup and goodbye on exit. row-limit INTEGER Set threshold for row limit prompt. list-dsn list of DSN configured into the section of pgclirc file. D, -dsn TEXT Use DSN configured into the section of pgclirc file. d, -dbname TEXT database name to connect to. single-connection Do not use a separate connection for completions. w, -no-password Never prompt for password. u, -user TEXT Username to connect to the postgres database. U, -username TEXT Username to connect to the postgres database. p, -port INTEGER Port number at which the postgres instance is listening. $ pgcli -help Usage: pgcli Options: -h, -host TEXT Host address of the postgres database.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |