Commit graph

39 commits

Author SHA1 Message Date
Jakub Zelenka
1e66e6ae73
Revert incomplete PG pipeline addition
Closes GH-12735
2023-11-20 16:22:29 +00:00
Dmitriy Degtyaryov
63898008c0 Fix GH-9344: pgsql pipeline mode proposal.
Adding pg_send_flush_request.
Fix freeze after next execute pg_send_* on PQgetResult in _php_pgsql_link_has_results.
Set nonblocking for pipelining mode.
No flush client buffer in pg_send_* for pipelining mode.

Close GH-12644
2023-11-10 16:06:04 +00:00
Máté Kocsis
7ae0273ba3 Make the $row param of pg_fetch_result(), pg_field_prtlen() and pg_field_is_null() nullable 2023-07-18 12:59:21 +02:00
Remi Collet
21aaf3321f
check PQsetErrorContextVisibility availability (libpq >= 9.6) 2023-06-21 08:47:59 +02:00
David CARLIER
dd8514a0bd ext/pgsql: adding pg_set_error_context_visibility.
another level of context for pg_last_error/pg_result_error() to include
or not the context in those. PQSHOW_CONTEXT_ERRORS being the default.

Close GH-11395
2023-06-13 18:07:39 +01:00
Máté Kocsis
85338569de Narrow bool return types to true when possible 2023-05-07 19:34:09 +02:00
David CARLIER
f31d253849 ext/pgsql adding PGSQL_ERRORS_SQLSTATE constant support.
Close GH-11181
2023-05-05 15:08:27 +01:00
David Carlier
7ec8ae12c4 ext/pgsql: pg_trace allow to refine its trace mode via 2 new constants.
- PGSQL_TRACE_SUPPRESS_TIMESTAMPS.
- PGSQL_TRACE_REGRESS_MODE to have a more verbose and observable
output to check possible regressions.

Close GH-11041
2023-05-05 11:05:03 +01:00
David CARLIER
6a9061e0af Fix GH-9344: pgsql pipeline mode proposal.
Adding pg_enter_pipeline_mode, pg_exit_pipeline_mode,
pg_pipeline_sync and pg_pipeline_status.

Close GH-10868
2023-04-28 20:53:11 +01:00
SATO Kentaro
7fccdf72a4
Add support for generating namespaced constant
Closes GH-10552
2023-02-23 10:05:30 +01:00
Máté Kocsis
eae893bd3e
Declare ext/pgsql constants in stubs (#9092) 2022-07-27 07:32:40 +02:00
Máté Kocsis
d98634e652
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix 2nd param name of pg_send_execute()
2021-10-13 14:19:54 +02:00
Máté Kocsis
ca219d7d27
Fix 2nd param name of pg_send_execute()
Closes GH-7576
2021-10-13 14:14:47 +02:00
Máté Kocsis
1bf1481a2a
Specify a few array func info entries (#7425) 2021-08-30 14:29:18 +02:00
Máté Kocsis
8e6e9838b0
Add support for generating MAY_BE_ARRAY_OF_REF func info flag (#7416) 2021-08-30 13:50:34 +02:00
Máté Kocsis
68946bdd90
Generate optimizer func info from stubs for ext/gd and ext/pgsql (#7408) 2021-08-26 17:38:08 +02:00
Máté Kocsis
b1822899fc
Add support for generating optimizer function info from stubs (#7367) 2021-08-24 16:35:33 +02:00
Máté Kocsis
2378f35787
Use single line phpdoc in stubs where possible 2021-07-20 13:16:56 +02:00
Joe Watkins
570d9b63e9
Not serializable flag permeation 2021-07-20 12:28:35 +02:00
Máté Kocsis
b382883696
Indent stubs inside global namespace blocks (#7261) 2021-07-20 10:23:58 +02:00
Máté Kocsis
32aff25ceb
Convert resources to objects in ext/pgsql
Closes GH-6791

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
2021-05-11 00:09:30 +02:00
Máté Kocsis
12799847a6
Merge branch 'PHP-8.0'
* Fix pg_get_notify() parameter name
2021-04-26 19:38:57 +02:00
Máté Kocsis
d1e590fe72
Fix pg_get_notify() parameter name
Closes GH-6916
2021-04-26 19:37:41 +02:00
Máté Kocsis
af56982a5e
Generate class entries from stubs for oci8, odbc, openssl, pcntl, pdo, pgsql
Closes GH-6691
2021-02-14 23:19:21 +01:00
Máté Kocsis
d5f92baad0 Fix default value handling of mysqli_fetch_object()
Make [] acceptable both for classes without constructors and
classes with a constructor that takes no arguments.

Closes GH-6336.
2020-10-20 16:48:12 +02:00
Máté Kocsis
d6264b0966
Verify parameter names of function aliases
Closes GH-6335
2020-10-16 10:56:33 +02:00
Nikita Popov
a7e84e2e02 Fix default value for some pgsql functions
These set the PGSQL_DML_EXEC flag by default.
2020-10-13 17:29:05 +02:00
Nikita Popov
7b0f5f424d Don't accept null in pg_unescape_bytea()
This is an error that slipped in via 8d37c37bcd.
pg_unescape_bytea() did not accept null in PHP 7.4, and it is not
meaningful for it to accept null now -- it will always fail, and now
with a misleading OOM message.
2020-10-13 15:37:13 +02:00
Nikita Popov
3171fec6da Update ext/pgsql parameter names
Closes GH-6294.
2020-10-13 12:30:44 +02:00
Nikita Popov
8ff2f2f84b Return empty array for no rows in pg_fetch_all()
This makes it line up with pg_fetch_all_columns(), as well as
similar functions in other exts, such as mysqli_fetch_all().
2020-09-21 17:22:02 +02:00
Nikita Popov
54f03d31e0 Promote invalid field to ValueError in pgsql
The same error condition is a ValueError in mysqli, be consistent.

Additionally, do not display the argument name for these errors.
As the signatures are overloaded, the argument name may not match
the meaning at all.
2020-09-21 17:00:23 +02:00
Nikita Popov
d1bbc39e4c pg_unescape_bytea() can only fail on OOM
The implementation did not check for PQunescapeBytea failure
correctly, because it checked for a null pointer after estrndup,
which certainly cannot happen. Inspection of the PGunescapeBytea
implementation has shown that this function can only fail on OOM,
so let's check for that explicitly and remove false as a possible
return type.

While we're here, avoid an unnecessary copy of the result.
2020-09-21 15:46:55 +02:00
Nikita Popov
7300f6fc17 Deprecate pgsql function aliases
These have been documentation-deprecated for a very long time,
make it official.
2020-09-21 11:33:05 +02:00
Máté Kocsis
8d37c37bcd
Fix a few UNKNOWN default values in ext/pgsql
Closes GH-6149
2020-09-17 11:00:59 +02:00
George Peter Banyard
d0111d785d Promote warnings to Errors in PostgreSQL extension
Do some drive by indentation fixes
Also fix pg_select() in regards to the $result_type arg which was missing from ZPP

Closes GH-6129
2020-09-14 17:01:35 +02:00
Nikita Popov
f29bfc0bd8 Use string|int union types in pgsql
For "field name or field offset" parameters.

Also make $ctor_params an ?array parameter.
2020-09-11 17:33:09 +02:00
Nikita Popov
68b21939ec Use proper int type for parameter 2020-09-09 17:18:58 +02:00
Nikita Popov
6145cac1af Fix default value 2020-09-09 17:14:14 +02:00
Nikita Popov
47688ab6d9 Add stub for pgsql extension 2020-09-09 16:47:10 +02:00