From e45d613091eebfd6acb70cfc792ea7a49fd89986 Mon Sep 17 00:00:00 2001 From: lacatoire Date: Mon, 8 Jun 2026 10:09:32 +0200 Subject: [PATCH] Document new pgsql functions added in PHP 8.4 --- .../pgsql/functions/pg-change-password.xml | 86 +++++++++++++++ reference/pgsql/functions/pg-jit.xml | 66 +++++++++++ .../pgsql/functions/pg-put-copy-data.xml | 81 ++++++++++++++ reference/pgsql/functions/pg-put-copy-end.xml | 79 +++++++++++++ reference/pgsql/functions/pg-socket-poll.xml | 104 ++++++++++++++++++ reference/pgsql/versions.xml | 5 + 6 files changed, 421 insertions(+) create mode 100644 reference/pgsql/functions/pg-change-password.xml create mode 100644 reference/pgsql/functions/pg-jit.xml create mode 100644 reference/pgsql/functions/pg-put-copy-data.xml create mode 100644 reference/pgsql/functions/pg-put-copy-end.xml create mode 100644 reference/pgsql/functions/pg-socket-poll.xml diff --git a/reference/pgsql/functions/pg-change-password.xml b/reference/pgsql/functions/pg-change-password.xml new file mode 100644 index 000000000000..07b11cdf3310 --- /dev/null +++ b/reference/pgsql/functions/pg-change-password.xml @@ -0,0 +1,86 @@ + + + + pg_change_password + Change a PostgreSQL user's password + + + + &reftitle.description; + + boolpg_change_password + PgSql\Connectionconnection + stringuser + stringpassword + + + pg_change_password changes the password of a + PostgreSQL user. This function uses the + PQchangePassword libpq function which handles + password encryption automatically based on the server's settings. + + + + + &reftitle.parameters; + + + connection + + &pgsql.parameter.connection; + + + + user + + + The name of the PostgreSQL user whose password to change. + + + + + password + + + The new password. + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.seealso; + + pg_connect + + + + + diff --git a/reference/pgsql/functions/pg-jit.xml b/reference/pgsql/functions/pg-jit.xml new file mode 100644 index 000000000000..66d160c24a58 --- /dev/null +++ b/reference/pgsql/functions/pg-jit.xml @@ -0,0 +1,66 @@ + + + + pg_jit + Returns the JIT information of the server + + + + &reftitle.description; + + arraypg_jit + PgSql\Connectionnullconnection&null; + + + pg_jit returns an array with the JIT (Just-In-Time + compilation) information of the PostgreSQL server. + + + + + &reftitle.parameters; + + + connection + + &pgsql.parameter.connection-with-nullable-default; + + + + + + + &reftitle.returnvalues; + + Returns an &array; containing the JIT information of the server. + + + + + &reftitle.seealso; + + pg_version + + + + + diff --git a/reference/pgsql/functions/pg-put-copy-data.xml b/reference/pgsql/functions/pg-put-copy-data.xml new file mode 100644 index 000000000000..cfb30fd89fc0 --- /dev/null +++ b/reference/pgsql/functions/pg-put-copy-data.xml @@ -0,0 +1,81 @@ + + + + pg_put_copy_data + Send data to the server during a COPY operation + + + + &reftitle.description; + + intpg_put_copy_data + PgSql\Connectionconnection + stringcmd + + + Sends data to the server during a COPY FROM STDIN + operation. A COPY command must have been issued + via pg_query before calling this function. + + + + + &reftitle.parameters; + + + connection + + &pgsql.parameter.connection; + + + + cmd + + + The data to send to the server. A final newline is automatically + added if not present. The data must be formatted according to + the COPY command's format. + + + + + + + + &reftitle.returnvalues; + + Returns 1 on success, 0 if the + data could not be queued (only in non-blocking mode), or + -1 on error. + + + + + &reftitle.seealso; + + pg_put_copy_end + pg_query + + + + + diff --git a/reference/pgsql/functions/pg-put-copy-end.xml b/reference/pgsql/functions/pg-put-copy-end.xml new file mode 100644 index 000000000000..efe7eecc8000 --- /dev/null +++ b/reference/pgsql/functions/pg-put-copy-end.xml @@ -0,0 +1,79 @@ + + + + pg_put_copy_end + Signal the completion of a COPY operation to the server + + + + &reftitle.description; + + intpg_put_copy_end + PgSql\Connectionconnection + stringnullerror&null; + + + Sends an end-of-data indication to the server during a + COPY FROM STDIN operation. + + + + + &reftitle.parameters; + + + connection + + &pgsql.parameter.connection; + + + + error + + + If not &null;, the COPY operation is forced to + fail with the given error message. + + + + + + + + &reftitle.returnvalues; + + Returns 1 on success, 0 if the + data could not be queued (only in non-blocking mode), or + -1 on error. + + + + + &reftitle.seealso; + + pg_put_copy_data + pg_query + + + + + diff --git a/reference/pgsql/functions/pg-socket-poll.xml b/reference/pgsql/functions/pg-socket-poll.xml new file mode 100644 index 000000000000..80e20d4ee8da --- /dev/null +++ b/reference/pgsql/functions/pg-socket-poll.xml @@ -0,0 +1,104 @@ + + + + pg_socket_poll + Poll a PostgreSQL connection socket for read/write readiness + + + + &reftitle.description; + + intpg_socket_poll + resourcesocket + intread + intwrite + inttimeout-1 + + + Polls a PostgreSQL connection socket for read and/or write readiness. + The socket can be obtained using pg_socket. + This function is useful for implementing non-blocking, asynchronous + query workflows. + + + + + &reftitle.parameters; + + + socket + + + A socket resource obtained from pg_socket. + + + + + read + + + Whether to check for read readiness. Pass 1 + to check, 0 to skip. + + + + + write + + + Whether to check for write readiness. Pass 1 + to check, 0 to skip. + + + + + timeout + + + The maximum number of milliseconds to wait. Pass + -1 to wait indefinitely, or + 0 to not wait at all. + + + + + + + + &reftitle.returnvalues; + + Returns a positive value if the socket is ready, 0 + if the timeout was reached, or -1 on error. + + + + + &reftitle.seealso; + + pg_socket + pg_consume_input + pg_send_query + + + + + diff --git a/reference/pgsql/versions.xml b/reference/pgsql/versions.xml index 871df8159879..86ba5ba2aaca 100644 --- a/reference/pgsql/versions.xml +++ b/reference/pgsql/versions.xml @@ -6,6 +6,7 @@ + @@ -48,6 +49,7 @@ + @@ -72,6 +74,8 @@ + + @@ -90,6 +94,7 @@ +