pgcli icon indicating copy to clipboard operation
pgcli copied to clipboard

\prompt not working with pgcli

Open abhijhanwar opened this issue 5 years ago • 1 comments
trafficstars

Description

To work with interactive SQLs, we need to provide input at sql runtime, for this we need \prompt to work, but it's not working with pgcli as shown below:

pgdb1> \i tab_size.sql syntax error at or near "" LINE 1: \prompt 'enter schema name here: ' schema_name ^

as can be seen above \prompt is not identified as keyword.

Please have a look.

Your environment

  • [ ] Please provide your OS and version information. MacOS - version 10.14.6
  • [ ] Please provide your CLI version. Version: 2.2.0
  • [ ] What is the output of pip freeze command. $ pip3 freeze awscli==1.17.0 botocore==1.14.0 cli-helpers==2.0.1 click==7.1.1 colorama==0.4.1 coloredlogs==10.0 configobj==5.0.6 docutils==0.15.2 Flask==1.1.1 humanfriendly==4.18 humanize==2.4.0 itsdangerous==1.1.0 Jinja2==2.11.1 jmespath==0.9.4 MarkupSafe==1.1.1 pgspecial==1.11.10 prompt-toolkit==3.0.5 psycopg2==2.8.5 pyasn1==0.4.8 Pygments==2.5.2 python-dateutil==2.8.1 PyYAML==5.2 retrying==1.3.3 rsa==3.4.2 s3transfer==0.3.0 setproctitle==1.1.10 six==1.13.0 sqlparse==0.3.0 tabulate==0.8.7 terminaltables==3.1.0 urllib3==1.25.7 wcwidth==0.2.3 Werkzeug==1.0.1

abhijhanwar avatar Jun 03 '20 18:06 abhijhanwar

pgcli does not support all meta-commands ("backslash commands") that exist in psql. \? will display all supported pgcli commands.

I can leave this open as feature request - but it's not a bug.

j-bennet avatar Jul 25 '20 21:07 j-bennet