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

[Feature] Support SQL string composition

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

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
python, sql

调研方向

首先检查 connector 现有的参数化查询支持,然后比较 pg8000 和 psycopg 文档中介绍的标识符组合方法。完成的标准是用户能够安全地组合动态 Redshift 标识符(例如 schema 和表名),并能防止 SQL injection。

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

描述

enhancement

The redshift connector currently supports parameterised queries (aka bind variables) which is great.

However some of our use cases require other parts of a Redshift SQL query to be dynamically created. These include components such as the table name, the schema... and are commonly referred to as Identifiers. For example f"SELECT * FROM {schema}.{table}"

Other libraries such as pg8000 and psycopg have developed modules to escape these variables via identifiers.

Beyond usability, the main advantage of this approach is that it helps with SQL injection attacks.

主要语言
Python
星标
220
派生
88
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

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

aws/amazon-redshift-python-driver 的其他 Issue

查看 aws/amazon-redshift-python-driver 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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