question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Redshift connection gets cast error in completion_refresh

See original GitHub issue

I just did a pip install -U pgcli to get 1.0.0 and attempted to connect to Redshift. The shell opens to a prompt like expected:

Version: 1.0.0
Chat: https://gitter.im/dbcli/pgcli
Mail: https://groups.google.com/forum/#!forum/pgcli
Home: http://pgcli.com
analytics>

But within a few seconds, the following exception appears:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line r
    self.run()
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line n
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/site-packages/pgcli/completion_refresher.py", line 65, in _bg_refresh
    refresher(completer, executor)
  File "/usr/local/lib/python2.7/site-packages/pgcli/completion_refresher.py", line 105, in refresh_tables
    completer.extend_columns(executor.table_columns(), kind='tables')
  File "/usr/local/lib/python2.7/site-packages/pgcli/pgcompleter.py", line 142, in extend_columns
    for schema, relname, colname, datatype in column_data:
  File "/usr/local/lib/python2.7/site-packages/pgcli/pgexecute.py", line 364, in table_columns
    for row in self._columns(kinds=['r']):
  File "/usr/local/lib/python2.7/site-packages/pgcli/pgexecute.py", line 359, in _columns
    cur.execute(sql)
ProgrammingError: cannot cast type regtype to character varying

I can use the shell, but autocompletion of table names is not working.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jklukascommented, Jun 29, 2016

Testing this since Redshift was announced to be working in https://github.com/dbcli/pgcli/issues/282.

BTW, I’m very excited about the finally having a chance to use pgcli now that it supports Redshift.

0reactions
amjithcommented, Jul 4, 2016

This is now fixed in the latest release v1.1.0 Please upgrade:

pip install -U pgcli
Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot Amazon Redshift connection errors
If your Amazon Redshift cluster was recently resized or restored from a snapshot, then check your cluster's subnet.
Read more >
Calling AWS Redshift Stored Procedures using Stored ...
I am using Amazon Redshift ODBC driver to create an ODBC connection to connect to AWS Redshift. Does anybody know how to resolve...
Read more >
Find Answers to AWS Questions about Amazon Redshift
When I run the query it gives me this error: `cannot cast type character varying to boolean`. _Why would I want to do...
Read more >
Why do I get a SQL error near "LIMIT" in Redshift when I don't ...
sr_customer_sk::bigint as store_sk, sr_returned_date_sk as date_sk, cast(0 as decimal(7,2)) as sales_price, cast(0 as decimal(7,2)) as profit, ...
Read more >
Troubleshooting Amazon Redshift connection problems
When you attempt to access the Redshift cluster, you get the following error: Error message: OperationalError: could not connect to server: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found