[php-src] Issue #12685: PGSQL pipeline mode constant PGRES_PIPELINE_ABORTED not found and naming problem
| From: | degtyaryov | Date: | Thu, 16 Nov 2023 04:37:47 +0000 |
| Subject: | [php-src] Issue #12685: PGSQL pipeline mode constant PGRES_PIPELINE_ABORTED not found and naming problem | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-245812@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/12685
Author: degtyaryov
### Description
Hello!
The following code:
```php
<?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_