PGSQL pipeline mode constant PGRES_PIPELINE_ABORTED not found and naming problem
Open
Nobody has claimed this yet.
Extension: pgsql
Feature
Status: Needs Triage
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by searching php-src for PGSQL_PIPELINE_ABORTED and the existing pgsql pipeline constants, then inspect the implementation of pg_pipeline_status() and pg_result_status(). Confirm that the missing PGRES_PIPELINE_ABORTED constant maps to libpq's PGRES_PIPELINE_ABORTED value of 11 and add coverage for its availability and value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, php, postgres
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100