]> granicus.if.org Git - php/commitdiff
Fix default value for some pgsql functions
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 13 Oct 2020 15:28:38 +0000 (17:28 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 13 Oct 2020 15:29:05 +0000 (17:29 +0200)
These set the PGSQL_DML_EXEC flag by default.

ext/pgsql/pgsql.stub.php
ext/pgsql/pgsql_arginfo.h

index 759313d8ba6605df0f94a8858dd6ba52eeaaf0c5..29e1bcf0f5b51ae79fa61ac7ba1d9a457f4bbcb8 100644 (file)
@@ -503,13 +503,13 @@ function pg_convert($connection, string $table_name, array $values, int $flags =
  * @param resource $connection
  * @return resource|string|bool
  */
-function pg_insert($connection, string $table_name, array $values, int $flags = 0) {}
+function pg_insert($connection, string $table_name, array $values, int $flags = PGSQL_DML_EXEC) {}
 
 /** @param resource $connection */
-function pg_update($connection, string $table_name, array $values, array $conditions, int $flags = 0): string|bool {}
+function pg_update($connection, string $table_name, array $values, array $conditions, int $flags = PGSQL_DML_EXEC): string|bool {}
 
 /** @param resource $connection */
-function pg_delete($connection, string $table_name, array $conditions, int $flags = 0): string|bool {}
+function pg_delete($connection, string $table_name, array $conditions, int $flags = PGSQL_DML_EXEC): string|bool {}
 
 /** @param resource $connection */
-function pg_select($connection, string $table_name, array $conditions, int $flags = 0, int $mode = PGSQL_ASSOC): array|string|false {}
+function pg_select($connection, string $table_name, array $conditions, int $flags = PGSQL_DML_EXEC, int $mode = PGSQL_ASSOC): array|string|false {}
index 6db1b8a1c3f611ec0ce5a443f86a2874019259ec..46a777d1bae69f1359113c2e819ae85db1e4cae2 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: deb01afb2b4e645c00684fae61a6042ebfbaaaa1 */
+ * Stub hash: cf7903b6548240de5be9f167a63478f846111e0f */
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_connect, 0, 0, 1)
        ZEND_ARG_TYPE_INFO(0, connection_string, IS_STRING, 0)
@@ -419,7 +419,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_insert, 0, 0, 3)
        ZEND_ARG_INFO(0, connection)
        ZEND_ARG_TYPE_INFO(0, table_name, IS_STRING, 0)
        ZEND_ARG_TYPE_INFO(0, values, IS_ARRAY, 0)
-       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "PGSQL_DML_EXEC")
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_update, 0, 4, MAY_BE_STRING|MAY_BE_BOOL)
@@ -427,21 +427,21 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_update, 0, 4, MAY_BE_STRING|M
        ZEND_ARG_TYPE_INFO(0, table_name, IS_STRING, 0)
        ZEND_ARG_TYPE_INFO(0, values, IS_ARRAY, 0)
        ZEND_ARG_TYPE_INFO(0, conditions, IS_ARRAY, 0)
-       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "PGSQL_DML_EXEC")
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_delete, 0, 3, MAY_BE_STRING|MAY_BE_BOOL)
        ZEND_ARG_INFO(0, connection)
        ZEND_ARG_TYPE_INFO(0, table_name, IS_STRING, 0)
        ZEND_ARG_TYPE_INFO(0, conditions, IS_ARRAY, 0)
-       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "PGSQL_DML_EXEC")
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_select, 0, 3, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_FALSE)
        ZEND_ARG_INFO(0, connection)
        ZEND_ARG_TYPE_INFO(0, table_name, IS_STRING, 0)
        ZEND_ARG_TYPE_INFO(0, conditions, IS_ARRAY, 0)
-       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "PGSQL_DML_EXEC")
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "PGSQL_ASSOC")
 ZEND_END_ARG_INFO()