Re:PostgreSQL on the Command Line
by kawera on Tuesday October 27, 2015 @02:01PM
(#10459902)
Pgcli is an alternative command line tool with auto-completion and syntax highlighting. Open source and works well: http://pgcli.com/
[ Parent
| on HN ]
Sure, you can use pgcli instead of psql. But it doesn't replace psql. In fact, most tasks described in the article cannot be accomplished with pgcli.
- it can't list schemas with \dn
- it can't list materialized views with \dm
- \dt <star>.users doesn't work as it does in psql, i.e. it just lists all tables due to the * instead of listing users tables in all schemas
- it can't use your editor with \e
- it can't input existing files with \i
- it can't redirect the output with \o
- it can't extract data with \copy
Re:PostgreSQL on the Command Line
by thelibrarian on Tuesday October 27, 2015 @06:36PM
(#10461685)
Out of curiosity, I just tried out v0.19.2 (the latest), and some of these now work:
- \dn works
- \dm does not
- \dt <star>.users now appears to work as per psql
- \e works
- \i works
- \o does not
- \copy does not
Funny, I just tested those yesterday. And they none of them seemed to work. And I think I had installed the newest version for the test. Anyways, I stand corrected. It's great to see some of these working now as the tab-completion is definitely better than psql's.
Note that the project is quite new and has a really active dev base - if you use those features, feel free to submit a PR (or add an issue) and it's pretty sure to get accepted.
Has someone raised these yet? Otherwise I will.