1
0
Fork 0
Commit Graph

379 Commits

Author SHA1 Message Date
Jonas Jelten bc66b85730 add main file to allow python3 -m pgcli execution 2019-12-19 00:18:14 +01:00
Amjith Ramanujam 901812a7bf
Merge pull request #1122 from TheJJ/prompt-colors
support ansi escape sequences for prompt colors
2019-12-08 19:19:43 -08:00
Irina Truong 51d4d4a04c
J bennet/release 2.2.0 (#1126)
* Changelog.

* Bump pgspecial.

* Restrict prompt_toolkit to <3.0.0.
2019-12-04 09:24:17 -08:00
Jonas Jelten 36605174a4 support ansi escape sequences for prompt colors 2019-11-25 22:51:15 +01:00
Irina Truong d758781858 Changelog. 2019-10-28 09:19:59 -07:00
Irina Truong 76133a3740 Changelog. 2019-10-26 13:22:54 -07:00
Amjith Ramanujam a713b5d08b
Merge pull request #1107 from owst/function_arg_completions_with_alias
Take account of table aliases when completing function args (#1048)
2019-10-16 20:57:19 -07:00
Owen Stephens 629a931aed fixup! fixup! Handle a multi-line query on Enter key-press (fixes #1031) 2019-10-16 22:26:25 +01:00
Owen Stephens 7f44748149 Handle a multi-line query on Enter key-press (fixes #1031)
Use a (conditional) Enter key-binding to force-handle a multi-line
buffer, rather than doing so by (conditionally) disabling the multiline
mode of prompt_toolkit.

This has the benefit of being more efficient (the multiline Condition
filter is called very often, which (due to the repeated query parsing)
causes editing to become slow with a large buffer that ends in a
semicolon), clearer in intent (we want to force-handle the query, rather
than (temporarily) disable multiline mode which indirectly forces the
buffer to be handled) and avoids a bug in multi-line history search
(issue #1031)
2019-10-13 01:07:57 +01:00
Owen Stephens b401b16d9a Take account of table aliases when completing function args (#1048) 2019-10-12 16:19:15 +01:00
Dick Marinus 67799b98ab add optional but default squash merge request to PULL_REQUEST_TEMPLATE (#1095) 2019-09-27 19:34:34 -07:00
Irina Truong 2e6ef5a84d Changelog. 2019-09-02 12:35:49 -07:00
Irina Truong b2ebe0e95c
Issue 1018 display first 1k rows (#1092)
* Added changes to remove the prompt on >1000 rows queries

* Reformatted with black

* Changed comment on row_limit parameter

* Added contribution to changelog and name to AUTHORS

* Refactored test to reflect new functionality

* Removed argument

* Removed debug echo statement

* Reformatted with black

* Added changes to remove the prompt on >1000 rows queries

* Reformatted with black

* Changed comment on row_limit parameter

* Added contribution to changelog and name to AUTHORS

* Refactored test to reflect new functionality

* Removed argument

* Removed debug echo statement

* Reformatted with black

* Added missing issue numbers in changelog

* Reformatted code using black
2019-08-23 13:44:36 -07:00
Pedro Ferrari 19c3e0eeb8 Add key bindings to consistently move up and down in history (#1084) 2019-07-29 13:00:33 -07:00
Sebastian Janko f85642da67 Issue 1019 stacktrace on empty query (#1078)
* Added changes to skip empty queries

Empty queries consist of one or more semicolons

* Reformatted with black

* Added contribution to changelog and name to AUTHORS

* Black.
2019-07-12 17:24:39 -07:00
Irina Truong 10cc4ce2b9 Partial fix for #1058. (#1068) 2019-06-09 17:05:28 +02:00
Amjith Ramanujam f27ac1c110
Merge pull request #1064 from dbcli/amjith/slash-G
Add \G as a temporary way to use expanded mode.
2019-06-03 17:12:38 -07:00
Pablo 6d6ab3dab7 Add keybinding for alt-enter to introduce a line break (#1065)
* Add keybinding for alt-enter to introduce a line break.

* Update changelog.

* Added myself to AUTHORS file

* Fixed quote issue by pre-commit
2019-06-02 19:15:16 -07:00
Amjith Ramanujam d4f4cc317d Update changelog. 2019-06-02 17:59:31 -07:00
Irina Truong a2ed5e46d1
Changelog update before release. (#1062) 2019-05-30 17:10:15 -07:00
Alexander Zawadzki df4dd00585 README.rst: tidy up redundant instructions (#1061)
* README.rst: tidy up redundant instructions 

Remove the README section which detailed how to force `psycopg2` 2.7 dependency installation from source rather than binary.

`psycopg2` 2.7 would automatically favour installation from binary. A bug affecting some users made it desirable to have the option to install from source instead. The README detailed how to do this using pip's `--no-binary` option (nice!).

`psycopg2` 2.8 has now split the binary and source dependencies into different packages with different names (source: [psycopg2 docs](http://initd.org/psycopg/docs/install.html#change-in-binary-packages-between-psycopg-2-7-and-2-8)) which makes the `--no-binary` instructions redundant. To specify source/binary you now need to explicitly specify the desired package.

As of #1060, installing `pgcli` from pip will result in the installation of `psycopg2` 2.8 from source.

* README: additional instructions for psycopg2 2.7 users

Anyone limited to psycopg2 2.7 may still encounter some known issues when installing from binary.
Add a link to the README to acknowledge this, and help those users install it from source.

* Update changelog.rst

* Update AUTHORS

* Update changelog
2019-05-30 10:03:47 -07:00
Telmo "Trooper 8c597751fd Allow psycopg2 up to 2.8.2 (#1060)
* Allow psycopg2 up to 2.8.2

This fixes the issue with pgcli not working on Arch Linux, since the package `python2-psycopg2` is already on 2.8.2.

* Added name to 'AUTHORS' and contribution to 'changelog.rst' referring to #2de6266

* Allow for newer versions of psycopg2 to be used
2019-05-29 21:14:32 -07:00
Irina Truong 8cb7009bcd
black all the things. (#1049)
* added black to develop guide

* no need for pep8radius.

* changelog.

* Add pre-commit checkbox.

* Add pre-commit to dev reqs.

* Add pyproject.toml for black.

* Pre-commit config.

* Add black to travis and dev reqs.

* Install and run black in travis.

* Remove black from dev reqs.

* Lower black target version.

* Re-format with black.
2019-05-25 13:08:56 -07:00
Irina Truong 300febccdd Dsn parameters not always present. (#1054)
* Dsn parameters not always present.
2019-05-11 07:57:45 +02:00
Amjith Ramanujam fe1b202c55
Merge branch 'master' into pr1047 2019-05-06 11:11:47 -07:00
Amjith Ramanujam dc43430a9a Update changelog. 2019-05-06 07:29:48 -07:00
Irina Truong f1fc864281 changelog. 2019-05-04 07:33:28 -04:00
VVelox 1421da3c33
Update changelog.rst 2019-05-03 04:24:27 -05:00
zzl 6d1b653e24 lazy load keyring. (#1046)
fix issue: https://github.com/dbcli/pgcli/issues/1041
2019-05-01 08:53:55 -07:00
Irina Truong 3fd91012f2
More intelligent dsn format (#1045)
* Psycopg2 already has a method to format a dsn. We should use it. Fix for #1043.

* Changelog.

* pep8.
2019-04-28 15:06:01 -07:00
Irina Truong 9a53fe859a Possibly fix #1040. (#1042)
Fix #1040
2019-04-28 08:00:40 +02:00
raylu eef0e0d65c Allow application_name to be overridden (#1044)
* Allow application_name to be overridden

* Fixed broken link.

* Default password value is empty str?

* Make pep8 happier.
2019-04-27 21:25:19 -06:00
Nathan Vērzemnieks 4af4e33e31 Allow escape to switch to vi navigation mode (#1039) 2019-04-13 13:22:03 -07:00
Irina Truong ab18b08903
Changelog update before release. Bump cli_helpers. (#1030) 2019-04-05 17:24:10 -07:00
Irina Truong b0529bcc4f Changelog. 2019-03-22 16:55:16 +00:00
Irina Truong 21e7c7cbc1 Changelog. 2019-03-18 03:10:52 +00:00
Amjith Ramanujam 3652134bc5
Merge branch 'master' into system-error 2019-03-16 21:18:21 -07:00
Amjith Ramanujam cbd944ffab
Merge branch 'master' into tab-on-line-start 2019-03-16 14:06:24 -07:00
Amjith Ramanujam 5d55e6822b Changelog update. 2019-03-15 20:32:23 -07:00
Irina Truong c447ffc887 Changelog. 2019-03-04 16:16:47 -08:00
Scott Brenstuhl 1c66dece59 Add reconnect automatically enhancement (#1009)
* Adding reconnect automatically enhancement

* files for pr checklist

* changelog fixes

* setting auto-reconnect to be the default

* fix issue of getting logged queries instead of most recent

* travisci pep8 check issue
2019-02-23 16:37:26 -08:00
ಠ_ಠ bd0aaefdd2 keybinding for dismissing autocompletelist (#1007)
* +added esc key to dismiss the autocomple list

* +added esc key to dismiss the autocomple list
2019-02-12 16:18:32 -08:00
Dick Marinus 351135b61e fix unhashable formatted text 2019-02-08 21:24:36 +01:00
Dick Marinus 862706ff03 Remove build dir before running sdist (#1002) 2019-01-25 12:37:17 -08:00
Amjith Ramanujam 3eff3bbebd
Merge pull request #1001 from dbcli/internal/add_behave_logging
Missed logfile for earlier clean up and add behave logging changes
2019-01-22 10:46:31 -08:00
Dick Marinus a88c693c49 fixup! Clean up and add behave logging (#956) 2019-01-22 19:18:39 +01:00
Marcin Cieślak 4542637eff Use pexpect.TIMEOUT instead of pexpect.exceptions.TIMEOUT
All pexpect submodules have been moved into the pexpect package as of version 3.0.
2019-01-22 00:05:20 +00:00
Marcin Cieślak ef8aac61c4 Determine hstore OID from the system view (#992)
Avoid error message on the server side if hstore
extension is not installed in the current database.

Issue: https://github.com/dbcli/pgcli/issues/991
2019-01-21 16:00:25 -08:00
Mikhail Elovskikh f614cef7ed Support multihost connection string (#978)
* Switch to psycopg2 parse_dsn instead of urlparse

* Added wronglink to contributors and updated changelog

* Fix test codestyle

* Support for PGPORT customization in tests

* Support for PGPORT customization in tests

* Refactored PGExecute init and moved short_host generation to object property

* Fix test util codestyle

* Fix local tests run

* Store PGExecute initial params in  _conn_params and added PGExecute.copy method

* Fix codestyle

* Added docstring to PGExecute.copy() method
2019-01-03 14:27:47 -08:00
Irina Truong b3bf7ec188
Changelog update for bugfix release. (#984) 2019-01-02 16:31:05 -08:00
Irina Truong 0cae7e2036
Remove some functions completions (#982)
Remove extension and private functions from completer.
2019-01-02 16:15:59 -08:00
igncampa 7b03f8e204 allow passing -u flag (lowercase) to specify username (#975)
* added -u flag
2018-11-30 15:21:12 -08:00
Amjith Ramanujam 3b9041fe36 Fix special commands (#973)
* Add tests for special commands completion.
2018-11-27 07:49:54 -08:00
Irina Truong 580ff415c8
going to release. (#972) 2018-11-18 20:16:29 -08:00
Amjith Ramanujam 25a66ecfb3 Fix the StopIteration issue in Python 3.7 (#971)
* Fix the StopIteration issue in Python 3.7
2018-11-18 20:11:15 -08:00
Amjith Ramanujam 923f2d6441 Enable suspend using C-Z. (#970)
* Enable suspend using C-Z.

* Update changelog.
2018-11-17 19:41:34 -08:00
Amjith Ramanujam 945461bfa2
Merge branch 'master' into tab-on-line-start 2018-11-17 19:34:36 -08:00
Amjith Ramanujam ec18ff0141
Merge branch 'master' into bugfix/named-queries-from-config 2018-11-17 11:25:20 -08:00
igncampa 819f66e5b5 Contrib guide improv (#946)
improved DEVELOP docs
2018-11-13 14:01:47 -08:00
Dick Marinus 94475e6283 Require prompt_toolkit>=2.0.6. 2018-11-11 13:42:33 -08:00
Daniel Egger b92743368b Bugfix for #938: load named queries from provided config file 2018-10-31 18:46:04 +01:00
Irina Truong 589c2abdfb
Missed changelog update. (#960) 2018-10-30 07:41:38 -07:00
Dick Marinus 12ad10f697 Clean up and add behave logging (#956) 2018-10-14 13:53:19 -07:00
Irina Truong fcf0eb022e
Fix for pgcli --list. (#952)
Fix for pgcli --list
2018-10-02 17:10:43 -07:00
Artur Balabanov f897ea466e Merge branch 'master' into tab-on-line-start 2018-10-01 10:25:13 +01:00
Irina Truong 029a1be016 Changelog update to release 2.0.0. 2018-09-28 14:25:54 -07:00
Irina Truong dfe700edea Changelog update to release 1.11.0. 2018-09-24 16:23:26 -07:00
Max Rothman 172c9cd271 Respect \pset pager on expected behavior
"\pset pager" has three possible values: "always", "on", and "off".
pgcli previously treated all non-"off" values as "always". This change
implements the expected behavior, which is to use the pager when the
output is larger than the terminal height (See \pset pager in
https://www.postgresql.org/docs/9.2/static/app-psql.html). Pgcli adds to
this by also using the pager when the output is wider than the terminal
width.

Fixes #813
2018-09-23 17:02:08 -04:00
Irina Truong 3f52d8db96 Let's release more bugfixes. 2018-07-27 12:03:12 -07:00
Artur Balabanov 632045487f Updated changelog 2018-07-27 17:15:32 +01:00
Irina Truong c48a68c2bd Changelog. 2018-07-26 05:11:41 +00:00
Lele Gaifax 05ec05c4cb Adapt the query used to get functions metadata to PG11
This fixes #919.
2018-07-25 08:13:17 +02:00
Lele Gaifax 6a18b6d0e3 Emanuele Gaifas -> Lele Gaifax 2018-07-25 08:11:13 +02:00
Irina Truong 3b7f30dff6 Changelog. 2018-07-24 15:17:08 -07:00
Irina Truong f24f484310 Changelog update to release 1.10.2. 2018-07-23 17:08:09 -07:00
Dick Marinus 868b81aa98 make keyring optional 2018-07-22 07:34:56 +02:00
Irina Truong 33936a8074 Bugfix release. 2018-07-20 05:11:02 +00:00
Irina Truong 8da6f41785 Changelog. 2018-07-19 18:24:35 -07:00
Irina Truong e9dfd5b532 Changelog update to release 1.10.0. 2018-07-13 13:45:48 -07:00
Artur Balabanov 27f2b6990d Updated the changelog with the bug fix description 2018-07-06 17:42:53 +01:00
Saif Hakim e5ced8d27e Fix changelog 2018-07-04 01:50:39 -07:00
Saif Hakim 80957c59c5 Fix lint, update AUTHORS, and changelog 2018-07-04 01:36:50 -07:00
catherinedevlin 74daa23a45 switched view query to imitating psql 2018-06-16 21:47:18 -07:00
Alexandr Korsak e6506eef4d add me to thanks inline block and to references to me 2018-06-15 23:43:37 +03:00
Alexandr Korsak 123664e913 update changelog and authors 2018-06-15 09:16:13 +03:00
Matthieu Guilbert beca282196 Update changelog. 2018-06-10 16:37:00 +08:00
Irina Truong 99338e3e27 Changelog link. 2018-06-06 09:48:48 -07:00
Matthieu Guilbert 87b6c9a211 chore: Update changelog and AUTHORS 2018-06-07 00:43:51 +08:00
Irina Truong 69364ab4a5 Changelog. 2018-06-01 08:27:09 -07:00
Irina Truong 908a8ddacf
Merge pull request #888 from dbcli/bugfix/optionalkeyring
make keyring optional
2018-05-29 09:10:28 +01:00
Dick Marinus 95fda8218b Refactor destructive warning in behave tests 2018-05-26 15:49:41 +02:00
Dick Marinus 2ce2a87f37 make keyring optional 2018-05-26 11:26:06 +02:00
Amjith Ramanujam 9ae9df624f
Merge branch 'master' into feature/get-last-sql-query 2018-05-18 21:48:21 -07:00
Amjith Ramanujam 0643fd6534
Merge branch 'master' into master 2018-05-17 05:57:46 -07:00
Dan Clark 51138b43d4 Updated AUTHORS and the changelog.rst 2018-05-17 06:14:12 -04:00
Amjith Ramanujam bd1da49564 Update changelog. 2018-05-15 10:09:47 -04:00
Rishi Ramraj a1d9b8a7cc Correct changelog 2018-05-15 01:34:48 -04:00
Rishi Ramraj e5f06b3fa2 Update changelog.rst 2018-05-15 01:04:03 -04:00
Amjith Ramanujam d971e49993
Merge pull request #877 from catherinedevlin/keep_callables
Keep callables
2018-05-14 17:32:11 -04:00
Jason Ribeiro 9014d96526 Add completion for table formats 2018-05-14 16:54:52 -04:00
catherinedevlin dc74a0acd0 Merge remote-tracking branch 'upstream/master' into keep_callables 2018-05-14 16:31:19 -04:00
catherinedevlin 3827ec514f crediting Catherine Devlin 2018-05-14 16:28:30 -04:00
Jason Ribeiro f836c3a3a4 Disable pager when using \watch 2018-05-14 14:20:37 -04:00
Jason Ribeiro dd9432d557 Add entries to changelog and AUTHORS 2018-05-14 12:23:42 -04:00
François Pietka 242577e694
Update changelog 2018-04-26 14:24:09 +02:00
Dick Marinus eabf0b1b9a Mark tests requiring a running database server as dbtest 2018-04-05 21:15:01 +02:00
Irina Truong e814835180 Changelog update to release 1.9.1. 2018-03-31 13:25:42 -07:00
fraoustin 7563f514af add feature in changelog 2018-03-29 18:58:43 +02:00
Irina Truong 10904eee43 Changelog update, and bump pgspecial for the release. 2018-03-02 10:24:41 -08:00
fraoustin 3338a931b7 add alias-dsn in changelog 2018-02-10 17:08:03 +01:00
Irina Truong 8138ae8e31
Merge pull request #832 from fraoustin/nopager
Nopager
2018-01-27 14:25:29 -08:00
fraoustin daaa1ca500
Update changelog.rst 2018-01-17 12:49:21 +01:00
Irina Truong d07230495d Removed support for Python 3.3. 2018-01-15 19:10:06 -08:00
fraoustin 57cc451f06 manage pset pager 2018-01-06 11:58:59 +01:00
Irina Truong b732754821
Changed next release version to "Upcoming" 2018-01-04 10:26:35 -08:00
fraoustin 6ee75d3172 add my github link 2018-01-03 22:10:40 +01:00
fraoustin 837dc74272 change msg if ValueError 2018-01-03 22:05:45 +01:00
Irina Truong cd7d16a885 Changed my name in changelog. 2017-12-22 10:49:26 -08:00
Irina Truong 4cbb0f408f More changes added to 1.8.2 release. 2017-12-20 20:44:36 -08:00
isank 437dc14d24 -- correct name in changelog
-- removed extra line from AUTHORS
2017-12-17 05:16:55 +05:30
Amjith Ramanujam 12072f765c
Update changelog.rst 2017-12-16 15:08:24 -08:00
isank 7e2734e718
Merge branch 'master' into 816 2017-12-17 04:33:21 +05:30
isank 135b859f6e -- added fix contrbution to changelog
-- added name to AUTHORS
2017-12-17 04:27:48 +05:30
Marcin Sztolcman 75dd3c1870 Merge branch 'master' of github.com:msztolcman/pgcli 2017-12-16 07:53:18 +01:00
Marcin Sztolcman b4962c95d8 Merge branch 'master' of github.com:dbcli/pgcli 2017-12-16 07:51:59 +01:00
Marcin Sztolcman 84145f409e
fixed reference 2017-12-16 07:47:22 +01:00
Marcin Sztolcman d8f310dd57 added author of change for prompt-dsn option 2017-12-15 08:47:07 +01:00
Marcin Sztolcman 330f4a28ab added entries to changelog and AUTHORS 2017-12-11 04:24:48 +01:00
Irina Truong 4d6a934798 Changelog update to release 1.8.2. 2017-12-04 19:12:11 -08:00
Dick Marinus c5a0e94675 Increase timeout for quitting pgcli 2017-10-24 09:03:21 +02:00
Irina Truong d3bb129b56 Changelog. 2017-10-21 11:14:58 -07:00
Amjith Ramanujam 614a42f03f Do NOT escape database names. 2017-10-11 12:58:32 -07:00
Dmitry B e1f066cdb3 Merge remote-tracking branch 'upstream/master' into feature_use_temp_config_for_tests 2017-10-06 22:30:21 +03:00
Irina Truong a74955ea9a Changelog. 2017-10-06 11:25:28 -07:00
Dmitry B aa20014213 use temp dir as config location in tests 2017-09-20 23:56:57 +03:00
Irina Truong 2205dbacba Changelog update to release 1.8.1. 2017-09-19 11:29:36 -07:00
Dick Marinus ea6a50583a Require cli_helpers 0.2.3 (fix #513) 2017-09-18 20:41:30 +02:00
Dick Marinus d81faefa5f Remove shebang and git execute permission from pgcli/main.py. 2017-09-15 20:46:51 +02:00
Irina Truong 148f8c2361 Changelog update to release 1.8.0. 2017-09-12 20:10:27 -07:00
Dick Marinus 8e4b0275ff Drop wcwidth dependency 2017-09-10 15:15:23 +02:00
Dick Marinus ca88e62a17 Port auto_vertical feature test from mycli to pgcli 2017-09-05 20:39:13 +02:00
Dick Marinus 223eec9d2c use cursor from psycopg in pgcli 2017-08-21 08:50:28 +02:00
Andrew Speed 82d84ec89f Remove OrderedDict workaround for python < 2.7 2017-08-20 14:46:45 +01:00
Irina Truong b136196f29 Merge pull request #780 from dbcli/feature/output_formatter_generator
Preliminary work for a future change in outputting results that uses less memory
2017-08-18 15:27:43 -07:00
Dick Marinus d2ecbde849 Preliminary work for a future change in outputting results that uses less memory 2017-08-18 20:40:16 +02:00
Dick Marinus 5ab0dbfdea Fix TODO, optionally use POSTGRES_USER, POSTGRES_HOST POSTGRES_PASSWORD from environment 2017-08-18 06:52:29 +02:00
Irina Truong 1e77eab21b Merge pull request #773 from dbcli/fpietka/conninfo
Add \conninfo command
2017-08-13 17:21:42 -07:00
François Pietka 3d2b4d0862
Update changelog 2017-08-12 13:03:29 +02:00
Amjith Ramanujam 887a826415 Merge branch 'master' into koljonen/array_formatting 2017-08-06 21:16:08 -06:00
Amjith Ramanujam 99c9040c3d Merge pull request #771 from dbcli/koljonen/reservered_words
Don't quote identifiers that are non-reserved keywords
2017-08-06 21:14:40 -06:00