ext/pgsql: pg_convert/pg_insert/pg_update/pg_delete caching regexes.

Close GH-15039
This commit is contained in:
David Carlier 2024-07-20 11:29:51 +01:00
parent 2cfcfe09a0
commit ba54cebb44
No known key found for this signature in database
GPG key ID: D308BD11AB42D054
3 changed files with 77 additions and 76 deletions

View file

@ -175,14 +175,17 @@ static const php_stream_ops php_stream_pgsql_fd_ops = {
php_pgsql_fd_set_option
};
#define PGSQL_MAX_REGEXES 11
ZEND_BEGIN_MODULE_GLOBALS(pgsql)
zend_long num_links,num_persistent;
zend_long max_links,max_persistent;
bool allow_persistent;
int ignore_notices;
int ignore_notices;
zend_long auto_reset_persistent;
int log_notices;
zend_object *default_link; /* default link when connection is omitted */
zend_string *regexes[PGSQL_MAX_REGEXES];
HashTable field_oids;
HashTable table_oids;
HashTable connections;