Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using pgcli with myduckserver throws error on start but works #354

Open
aszenz opened this issue Jan 12, 2025 · 0 comments
Open

Using pgcli with myduckserver throws error on start but works #354

aszenz opened this issue Jan 12, 2025 · 0 comments

Comments

@aszenz
Copy link

aszenz commented Jan 12, 2025

Not sure why postgres client is supported the best, i normally use pgcli

pgcli "postgresql://[email protected]:15432"                                                                                                                       

On opening it throws this error but the repl does open and work only to throw the same error again on running statements.

pgcli 
Server: PostgreSQL 16.1 (Homebrew)
Version: 4.1.0
Home: http://pgcli.com
[email protected]:postgres> Exception in thread completion_refresh:
Traceback (most recent call last):
  File "/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/lib/python3.12/threading.py", line 1075, in _bootstrap_inner
    self.run()
  File "/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/lib/python3.12/threading.py", line 1012, in run
    self._target(*self._args, **self._kwargs)
  File "/nix/store/82zmkrsm2acx5g1w839x2kpsrvc11hwx-python3.12-pgcli-4.1.0/lib/python3.12/site-packages/pgcli/completion_refresher.py", line 67, in _bg_refresh
    refresher(completer, executor)
  File "/nix/store/82zmkrsm2acx5g1w839x2kpsrvc11hwx-python3.12-pgcli-4.1.0/lib/python3.12/site-packages/pgcli/completion_refresher.py", line 114, in refresh_tables
    completer.extend_relations(executor.tables(), kind="tables")
  File "/nix/store/82zmkrsm2acx5g1w839x2kpsrvc11hwx-python3.12-pgcli-4.1.0/lib/python3.12/site-packages/pgcli/pgcompleter.py", line 217, in extend_relations
    data = [self.escaped_names(d) for d in data]
                                           ^^^^
  File "/nix/store/82zmkrsm2acx5g1w839x2kpsrvc11hwx-python3.12-pgcli-4.1.0/lib/python3.12/site-packages/pgcli/pgexecute.py", line 557, in tables
    yield from self._relations(kinds=["r", "p", "f"])
  File "/nix/store/82zmkrsm2acx5g1w839x2kpsrvc11hwx-python3.12-pgcli-4.1.0/lib/python3.12/site-packages/pgcli/pgexecute.py", line 552, in _relations
    cur.execute(self.tables_query, [kinds])
  File "/nix/store/82zmkrsm2acx5g1w839x2kpsrvc11hwx-python3.12-pgcli-4.1.0/lib/python3.12/site-packages/pgcli/pgexecute.py", line 91, in execute
    super().execute(*args, **kwargs)
  File "/nix/store/nppbbyd2skgpbmda7idc5llg6j2pzm8j-python3.12-psycopg-3.2.3/lib/python3.12/site-packages/psycopg/cursor.py", line 97, in execute
    raise ex.with_traceback(None)
psycopg.errors.InternalError_: Binder Error: UNNEST not supported here (errno 1105) (sqlstate HY000)

Relevant logs from myduck

time="2025-01-12T14:49:17Z" level=warning msg="error running query" connectTime="2025-01-12 14:47:46.811102783 +0000 UTC m=+624.907255102" connectionDb=public connectionID=39 error="Binder Error: UNNEST not supported here"
time="2025-01-12T14:49:17Z" level=warning msg="Failed to handle statement {SELECT n.nspname as schema,\n                    c.relname as name,\n                    CASE c.relkind\n                      WHEN 'r' THEN 'table' WHEN 'v' THEN 'view'\n                      WHEN 'p' THEN 'partitioned table'\n                      WHEN 'm' THEN 'materialized view' WHEN 'i' THEN 'index'\n                      WHEN 'S' THEN 'sequence' WHEN 's' THEN 'special'\n                      WHEN 'f' THEN 'foreign table' END\n                    as type,\n                    pg_catalog.pg_get_userbyid(c.relowner) as owner\n                    \n            FROM    pg_catalog.pg_class c\n                    LEFT JOIN pg_catalog.pg_namespace n\n                      ON n.oid = c.relnamespace\n            WHERE   c.relkind = ANY('{r,p,v,m,S,f,\"\"}')\n                \n            AND n.nspname <> 'pg_catalog'\n            AND n.nspname <> 'information_schema'\n            AND n.nspname !~ '^pg_toast'\n            AND pg_catalog.pg_table_is_visible(c.oid) \n                \n            ORDER BY 1, 2\n         SELECT n.nspname AS schema, c.relname AS name, CASE c.relkind WHEN 'r' THEN 'table' WHEN 'v' THEN 'view' WHEN 'p' THEN 'partitioned table' WHEN 'm' THEN 'materialized view' WHEN 'i' THEN 'index' WHEN 'S' THEN 'sequence' WHEN 's' THEN 'special' WHEN 'f' THEN 'foreign table' END AS type, pg_catalog.pg_get_userbyid(c.relowner) AS owner FROM pg_catalog.pg_class AS c LEFT JOIN pg_catalog.pg_namespace AS n ON n.oid = c.relnamespace WHERE ((((c.relkind = ANY ('{r,p,v,m,S,f,\"\"}')) AND (n.nspname != 'pg_catalog')) AND (n.nspname != 'information_schema')) AND (n.nspname !~ '^pg_toast')) AND pg_catalog.pg_table_is_visible(c.oid) ORDER BY 1, 2 SELECT true false false <nil> <nil> <nil>} outside engine: fallback statement execution failed: Binder Error: UNNEST not supported here (errno 1105) (sqlstate HY000)" connectionID=39 protocol=pg
fallback statement execution failed: Binder Error: UNNEST not supported here (errno 1105) (sqlstate HY000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant