pgcli icon indicating copy to clipboard operation
pgcli copied to clipboard

Wrong quotation in \ev

Open Jakubzik opened this issue 3 years ago • 1 comments

Description

\ev schema.my_view produces CREATE OR REPLACE VIEW "schema.my_view". It should produce ... VIEW "schema"."my_view", I think (with quotes enclosing "schema" and "my_view" separately).

The effect or this had me confused for quite a while, as the CREATE OR REPLACE ... statement (with the wrong quotation marks) produces no exception, but of course it also does not work as expected (but creates a new view instead).

Your environment

  • Arch Linux
  • pgcli 3.5.0
  • pip freeze: anytree==2.8.0 appdirs==1.4.4 apsw==3.38.5.post1 argcomplete==2.0.0 async-timeout==4.0.2 autocommand==2.2.1 backports.csv==1.0.7 beautifulsoup4==4.11.1 Brotli==1.0.9 brotlicffi==1.0.9.2 btrfsutil==6.0 CacheControl==0.12.11 cchardet==2.1.7 certifi==2022.9.24 cffi==1.15.1 chardet==5.0.0 cli-helpers==2.2.1 click==8.1.3 colorama==0.4.5 commonmark==0.9.1 configobj==5.1.0.dev0 contextlib2==21.6.0 cryptography==38.0.1 css-parser==1.0.7 cssselect==1.1.0 cupshelpers==1.0 Cython==0.29.32 distlib==0.3.6 distro==1.7.0 dnspython==2.2.1 docutils==0.19 entrypoints==0.4 feedparser==6.0.10 filelock==3.8.0 future==0.18.2 gpg==1.18.0 html2text==2020.1.16 html5-parser==0.4.10 html5lib==1.1 humanize==3.1.0 idna==3.4 ifaddr==0.2.0 imaplib2==3.6 importlib-metadata==5.0.0 inflate64==0.1.3 inflect==6.0.0 jaraco.classes==3.2.3 jaraco.context==4.1.2 jaraco.functools==3.5.2 jaraco.text==3.9.1 jeepney==0.8.0 Jinja2==3.1.2 keyring==23.9.3 lensfun==0.3.3 lockfile==0.12.2 louis==3.23.0 lxml==4.9.1 Markdown==3.4.1 MarkupSafe==2.1.1 mechanize==0.4.8 meson==0.63.3 more-itertools==8.14.0 msgpack==1.0.4 multivolumefile==0.2.3 netifaces==0.11.0 netsnmp-python==1.0a1 nspektr==0.4.0 offlineimap==8.0.0 openshot-qt==2.6.1 ordered-set==4.1.0 packaging==21.3 pdftotext==2.2.2 pendulum==2.1.2 pep517==0.13.0 pgcli==3.5.0 pgspecial==2.0.1 Pillow==9.2.0 pipx==1.1.0 platformdirs==2.5.2 ply==3.11 progress==1.6 prompt-toolkit==3.0.31 psutil==5.9.2 psycopg==3.1.3 psycopg-c==3.1.3 psycopg2==2.9.3 py7zr==0.19.0 pybcj==1.0.1 pycairo==1.21.0 pychm==0.8.6 pycparser==2.21 pycryptodome==3.15.0 pycryptodomex==3.12.0 pycups==2.0.1 pycurl==7.45.1 pydantic==1.10.2 Pygments==2.11.1 PyGObject==3.42.2 pyOpenSSL==22.1.0 pyparsing==3.0.9 pyppmd==1.0.0 PyQt5==5.15.7 PyQt5-sip==12.11.0 PyQt6==6.4.0 PyQt6-sip==13.4.0 PyQt6-WebEngine==6.4.0 PyQtWebEngine==5.15.6 PySocks==1.7.1 python-dateutil==2.8.2 pytzdata==2020.1 PyYAML==6.0 pyzmq==24.0.1 pyzstd==0.15.3 qutebrowser==2.5.2 ranger-fm==1.9.3 regex==2022.9.13 reportlab==3.6.11 requests==2.28.1 requests-file==1.5.1 resolvelib==0.8.1 retrying==1.3.3 rfc6555==0.1.0 rich @ file:///build/python-rich/src/rich-12.6.0/dist/rich-12.6.0-py3-none-any.whl SecretStorage==3.3.3 selectors2==2.0.2 setproctitle==1.3.1 sgmllib3k==1.0.0 simplejson==3.17.6 six==1.16.0 soupsieve==2.3.2.post1 sqlparse==0.4.2 tabulate==0.9.0 TBB==0.2 tenacity==8.1.0 terminaltables==3.1.0 texttable==1.6.4 tldextract==3.4.0 toml==0.10.2 tomli==2.0.1 torbrowser-launcher==0.3.5 trove-classifiers==2022.9.26 typing_extensions==4.3.0 unrardll==0.1.5 urllib3==1.26.12 userpath==1.8.0 validate==5.1.0.dev0 validate-pyproject==0.10.1 visidata==2.10.2 wcwidth==0.2.5 webencodings==0.5.1 youtube-dl==2021.12.17 zeroconf==0.39.1 zipfile-deflate64==0.2.0 zipp==3.9.0

Jakubzik avatar Oct 16 '22 16:10 Jakubzik

This issue has been fixed by #1384, which has been merged in 2db54f14aae65e2639d1392fc4154964fb762d4e. The fix is not part of any release yet, but this issue can be closed.

dbaty avatar Sep 27 '23 05:09 dbaty

The aforementioned fix has been included in pgcli since version 4.0.0.

dbaty avatar May 23 '24 06:05 dbaty