PGSQL pipeline mode constant PGRES_PIPELINE_ABORTED not found and naming problem
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C
- Sterne
- 40.4k
- Forks
- 8.1k
- Ø Merge
- 2 T. 13 Std.
- Gemergte PRs (30 T.)
- 96
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der Suche in php-src nach PGSQL_PIPELINE_ABORTED und den vorhandenen pgsql-Pipeline-Konstanten und untersuche anschließend die Implementierung von pg_pipeline_status() und pg_result_status(). Bestätige, dass die fehlende Konstante PGRES_PIPELINE_ABORTED dem libpq-Wert PGRES_PIPELINE_ABORTED von 11 entspricht, und füge Tests für ihre Verfügbarkeit und ihren Wert hinzu.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- c, php, postgres
- Bereich
- databases
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 48/100