PGSQL pipeline mode constant PGRES_PIPELINE_ABORTED not found and naming problem
未关闭
还没有人认领这个 Issue。
Extension: pgsql
Feature
Status: Needs Triage
- 主要语言
- C
- 星标
- 40.4k
- 派生
- 8.2k
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 96
描述
Description
Hello!
The following code:
<?php
$is_aborted_pipeline_status = (pg_pipeline_status($connection) === PGSQL_PIPELINE_ABORTED); // PQ_PIPELINE_ABORTED
$is_aborted_result_status = (pg_result_status($result) === 11); // PGRES_PIPELINE_ABORTED
In libpq exists two constant:
PQ_PIPELINE_ABORTED = 2
PGRES_PIPELINE_ABORTED = 11
In php naming constant rules:
PQ_* -> PGSQL_*
PQRES_* -> PGSQL_*
Need add constant PGRES_PIPELINE_ABORTED in PHP!
The absence of a second constant in IDE autocompletion leads to unobvious errors.
PHP Version
PHP 8.3
Operating System
No response
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先在 php-src 中搜索 PGSQL_PIPELINE_ABORTED 和现有的 pgsql pipeline 常量,然后检查 pg_pipeline_status() 和 pg_result_status() 的实现。确认缺失的 PGRES_PIPELINE_ABORTED 常量映射到 libpq 的 PGRES_PIPELINE_ABORTED 值 11,并为其可用性和值添加测试覆盖。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- c, php, postgres
- 领域
- databases
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 48/100