Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

\d schema.table crashes

オープン
#87 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
42/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
postgresql, python
領域
cli, databases

調査の方向性

PostgreSQL 11.5 に対して ipython-sql 経由で %sql \d pg_catalog.pg_class のクラッシュを再現し、その後、trace に示されている sql/run.py の呼び出し箇所で pgspecial の結果を調べてください。動作している %sql \dn pg_catalog の経路と比較してください。完了条件は、テーブルコマンドが AttributeError を発生させず、結果を返すことです。

索引モデルが issue の本文から書いたものです。

説明

I am using the latest version of pgspecial with postgresql 11.5 on Manjaro Linux.

I am using pgspecial from ipython-sql

Once I connect to my DB, I can run commands such as:

%sql \dn pg_catalog

and get proper output

But, if I try to run a command such as:

%sql \d pg_catalog.pg_class

it crashes with the following stack trace

`

AttributeError Traceback (most recent call last)
in
----> 1 get_ipython().run_line_magic('sql', '\d pg_catalog.pg_class')

/usr/lib/python3.7/site-packages/IPython/core/interactiveshell.py in run_line_magic(self, magic_name, line, _stack_depth)
2312 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
2313 with self.builtin_trap:
-> 2314 result = fn(*args, **kwargs)
2315 return result
2316

</usr/lib/python3.7/site-packages/decorator.py:decorator-gen-127> in execute(self, line, cell, local_ns)

/usr/lib/python3.7/site-packages/IPython/core/magic.py in (f, *a, **k)
185 # but it's overkill for just that one bit of state.
186 def magic_deco(arg):
--> 187 call = lambda f, *a, **k: f(*a, **k)
188
189 if callable(arg):

</usr/lib/python3.7/site-packages/decorator.py:decorator-gen-126> in execute(self, line, cell, local_ns)

/usr/lib/python3.7/site-packages/IPython/core/magic.py in (f, *a, **k)
185 # but it's overkill for just that one bit of state.
186 def magic_deco(arg):
--> 187 call = lambda f, *a, **k: f(*a, **k)
188
189 if callable(arg):

/usr/lib/python3.7/site-packages/sql/magic.py in execute(self, line, cell, local_ns)
93
94 try:
---> 95 result = sql.run.run(conn, parsed['sql'], self, user_ns)
96
97 if result is not None and not isinstance(result, str) and self.column_local_vars:

/usr/lib/python3.7/site-packages/sql/run.py in run(conn, sql, config, user_namespace)
335 _, cur, headers, _ = pgspecial.execute(
336 conn.session.connection.cursor(), statement)[0]
--> 337 result = FakeResultProxy(cur, headers)
338 else:
339 txt = sqlalchemy.sql.text(statement)

/usr/lib/python3.7/site-packages/sql/run.py in init(self, cursor, headers)
298
299 def init(self, cursor, headers):
--> 300 self.fetchall = cursor.fetchall
301 self.fetchmany = cursor.fetchmany
302 self.rowcount = cursor.rowcount

AttributeError: 'list' object has no attribute 'fetchall'
`

It doesn't matter what table I use.

主要言語
Python
スター
86
フォーク
54
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

dbcli/pgspecial のほかの issue

dbcli/pgspecial の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。