summaryrefslogtreecommitdiffstats
path: root/pgcli/pgexecute.py
AgeCommit message (Collapse)Author
2023-10-12fixed #1403, improved comment handling (#1404)ERYoung11
* fixed #1403, improved comment handling * black + hooks + changelog --------- Co-authored-by: Irina Truong <i.chernyavska@gmail.com>
2023-03-18Apply black (version 23.1.0)Damien Baty
2023-01-02Fix connecting with dsn.Irina Truong
2022-11-21fix psycopg.sql.Identifier in \ev handling (#1384)Andy Schoenberger
2022-08-31black'd the code.ERYoung11
2022-08-31fixed comments with special see Issue #1362ERYoung11
2022-06-08Fix typos (#1345)Kian-Meng Ang
Co-authored-by: Irina Truong <i.chernyavska@gmail.com>
2022-06-06Port to psycopg3 (#1324)Irina Truong
* WIP. * Add some comments about porting from psycopg 2 to 3 (#1318) * WIP * Disable _set_wait_callback() * TransactionStatus. * First working query. * More pg3 changes. * test_pgexecute still fails. * Fix bytea support. * Fix json and enum unicode. * Get unit tests to pass. * Behave tests still break, WIP. * Prompt seems to be displayed fine, why don't the tests see the whitespace? * Python version. * Fix test. * Black. * Added black to dev reqs. * nbu link for donations. * Use psycopg.sql to format statement. * Special case for show help in pgbouncer. * Fix test. * Added integration test. * Install pgbouncer in ci. * Fix integration test. * Remove tmate session. * Revert commenting out python versions. * Pin pgspecial to >=2. * Changelog. Co-authored-by: Daniele Varrazzo <daniele.varrazzo@gmail.com> Co-authored-by: Amjith Ramanujam <amjith.r@gmail.com>
2022-04-03add explain visualizer (#1279)Daniel Kukula
* add explain visualizer * format files * remove humanize dependency * disable by default * add explain visualizer * run black
2022-02-22Add some comments about porting from psycopg 2 to 3 (#1318)Daniele Varrazzo
2021-11-18no need to strip_comments (#1296)Edoardo Ceccarelli
2021-05-21Another attempt to fix pgbouncer error (1093.) (#1097)Irina Truong
* Another attempt to fix pgbouncer error (1093.) * Fixes for various pgbouncer problems. * different approach with custom cursor. * Fix rebase. * Missed this. * Fix completion refresher test. * Black. * Unused import. * Changelog. * Fix race condition in test. * Switch from is_pgbouncer to more generic is_virtual_database, and duck-type it. Add very dumb unit test for virtual cursor. * Remove debugger code.
2021-02-12Modernize code to Python 3.6+ (#1229)Miroslav Šedivý
1. `class A(object)` can be written as `class A:` 2. replace `dict([…])` and `set([…])` with `{…}` 3. use f-strings or compact `.format` 4. use `yield from` instead of `yield` in a `for` loop 5. import `mock` from `unittest` 6. expect `OSError` instead of `IOError` or `select` error 7. use Python3 defaults for file reading or `super()` 8. remove redundant parenthesis (keep those in tuples though) 9. shorten set intersection instead of creating lists 10. backslashes in strings do not have to be escaped if prepended with `r`
2020-09-14format code using black.laixintao
2020-06-26Fix for #1193 list index out of range on sql comment.Irina Truong
2020-03-14removed py2-related stuffGeorgy Frolov
2020-03-11Drop Python3.5. (#1154)赖信涛
* Drop Python3.5. * delete 3.5 from setup.py * fix black format. Using python3.7 for development now. * black target to py36
2020-02-13Add Support for partitioned tables. (#1145)lazydba247
* partitioned tables: add support Starting from 9.6+ relkind has new members (more info here: https://www.postgresql.org/docs/12/catalog-pg-class.html) * Update AUTHORS * Update changelog.rst * foreign tables: add support Starting from 9.6+ relkind has new members (more info here: https://www.postgresql.org/docs/12/catalog-pg-class.html)
2019-10-26Use libpq version instead of psycopg2 version.Amjith Ramanujam
2019-10-26Log message.Irina Truong
2019-10-19Fix for PQconninfo not available.Irina Truong
2019-08-28Get server params, such as is_superuser and server_version, without extra ↵Irina Truong
queries.
2019-07-12Issue 1019 stacktrace on empty query (#1078)Sebastian Janko
* 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-06-09Partial fix for #1058. (#1068)Irina Truong
2019-06-02Run black.Amjith Ramanujam
2019-06-02Add \G as a temporary way to use expanded mode.Amjith Ramanujam
This is similar to mycli.
2019-05-25black all the things. (#1049)Irina Truong
* 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-21pep8.Irina Truong
2019-05-13Handle password with spaces.Amjith Ramanujam
2019-05-11Dsn parameters not always present. (#1054)Irina Truong
* Dsn parameters not always present.
2019-05-06Merge branch 'master' into pr1035Amjith Ramanujam
2019-05-06Check if dsn and password values are passed in.Amjith Ramanujam
2019-04-28More intelligent dsn format (#1045)Irina Truong
* Psycopg2 already has a method to format a dsn. We should use it. Fix for #1043. * Changelog. * pep8.
2019-04-27Allow application_name to be overridden (#1044)raylu
* Allow application_name to be overridden * Fixed broken link. * Default password value is empty str? * Make pep8 happier.
2019-04-09Revert main changes; Filter unwanted params when dsn presentXavier Francisco
2019-04-08Fix usage of pgserviceXavier Francisco
2019-03-18Fix for https://github.com/dbcli/pgcli/issues/1014.Irina Truong
2019-03-16Merge branch 'master' into system-errorAmjith Ramanujam
2019-03-16Remove the unnecessary try/except.Amjith Ramanujam
2019-03-16Access only the required element from the tuple.Amjith Ramanujam
2019-03-15Catch and ignore the system interrupt.Amjith Ramanujam
2019-03-04Fix crash when using --single-connection.Irina Truong
2019-01-21Determine hstore OID from the system view (#992)Marcin Cieślak
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-03Support multihost connection string (#978)Mikhail Elovskikh
* 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-02Remove some functions completions (#982)Irina Truong
Remove extension and private functions from completer.
2018-07-25Adapt the query used to get functions metadata to PG11Lele Gaifax
This fixes #919.
2018-07-24Change server version query.Irina Truong
2018-07-20Print server version as part of welcome message.Irina Truong
2018-07-04Fix lint, update AUTHORS, and changelogSaif Hakim
2018-07-03Avoid reconnect prompt after error if connection is still validSaif Hakim
Instead of whitelisting all errors that do not require reconnecting, we simply only reconnect if we detect a disconnect has occurred. psql notably behaves in a similar way: https://git.io/fbxuc#L1461 Fixes #807