Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

`\ef` in a transaction causes pgcli to crash

未关闭
#1,392 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
postgresql, python
领域
cli, databases

调研方向

在 pgcli 中启动一个事务并针对 PostgreSQL 运行 \ef function_name,以复现该问题。跟踪 \ef 命令的错误处理,然后验证在事务中使用该命令时,PostgreSQL 错误会显示出来且 pgcli 不会崩溃。

由索引模型根据 Issue 内容生成。

描述

Description

If a transaction is manually started (begin transaction;) then an attempt to edit a postgres function or stored procedure is made via \ef function_name, pgcli will crash.

Expected behavior: Although it is a postgres error to try to edit a function within a transaction, pgcli should not crash.

Your environment

  • FreeBSD 13.1
  • pgcli 3.5.0
  • postgres 14.6

pip freeze output:

acme==2.1.0
awscli==1.27.16
botocore==1.29.13
certbot==2.1.0
certbot-nginx==2.1.0
certifi==2022.9.24
cffi==1.15.1
charset-normalizer==3.0.1
cli-helpers==2.3.0
click==8.0.3
colorama==0.4.5
ConfigArgParse==1.5.3
configobj==5.0.6
cryptography==3.4.8
distro==1.8.0
dnspython==2.2.1
docutils==0.17.1
idna==3.4
importlib-metadata==4.8.1
jmespath==1.0.1
josepy==1.13.0
Markdown==3.3.7
parsedatetime==2.6
pendulum==2.1.2
pgcli==3.5.0
pgspecial==2.0.1
prompt-toolkit==3.0.36
psycopg==3.1.7
psycopg-pool==3.1.4
pyasn1==0.4.8
pycparser==2.21
Pygments==2.14.0
pyOpenSSL==20.0.1
pyparsing==3.0.9
pyRFC3339==1.1
PySocks==1.7.1
python-dateutil==2.8.2
pytz==2022.7
pytzdata==2020.1
PyYAML==5.4.1
requests==2.28.1
rsa==4.9
s3transfer==0.6.0
setproctitle==1.3.2
six==1.16.0
sqlparse==0.4.3
tabulate==0.8.9
typing-extensions==4.4.0
urllib3==1.26.13
wcwidth==0.1.8
zipp==3.4.0
  • Please provide your OS and version information.
  • Please provide your CLI version.
  • What is the output of pip freeze command.
主要语言
Python
星标
13.4k
派生
613
平均合并
12 小时 45 分钟
30 天内合并 PR
5

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

dbcli/pgcli 的其他 Issue

查看 dbcli/pgcli 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。