summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php4
-rw-r--r--system/database/drivers/postgre/postgre_driver.php19
-rw-r--r--user_guide_src/source/changelog.rst6
-rw-r--r--user_guide_src/source/database/db_driver_reference.rst2
-rw-r--r--user_guide_src/source/installation/upgrade_3112.rst6
5 files changed, 20 insertions, 17 deletions
diff --git a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php
index eee0fc0b3..f6241136d 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php
@@ -255,7 +255,7 @@ class CI_DB_pdo_pgsql_driver extends CI_DB_pdo_driver {
{
return 'SELECT "column_name"
FROM "information_schema"."columns"
- WHERE LOWER("table_name") = '.$this->escape(strtolower($table));
+ WHERE "table_schema" = \''.$this->schema.'\' AND LOWER("table_name") = '.$this->escape(strtolower($table));
}
// --------------------------------------------------------------------
@@ -270,7 +270,7 @@ class CI_DB_pdo_pgsql_driver extends CI_DB_pdo_driver {
{
$sql = 'SELECT "column_name", "data_type", "character_maximum_length", "numeric_precision", "column_default"
FROM "information_schema"."columns"
- WHERE LOWER("table_name") = '.$this->escape(strtolower($table));
+ WHERE "table_schema" = \''.$this->schema.'\' AND LOWER("table_name") = '.$this->escape(strtolower($table));
if (($query = $this->query($sql)) === FALSE)
{
diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php
index 87aaed7da..af636e3f5 100644
--- a/system/database/drivers/postgre/postgre_driver.php
+++ b/system/database/drivers/postgre/postgre_driver.php
@@ -78,22 +78,12 @@ class CI_DB_postgre_driver extends CI_DB {
// --------------------------------------------------------------------
/**
- * Class constructor
+ * Build DSN
*
- * Creates a DSN string to be used for db_connect() and db_pconnect()
- *
- * @param array $params
* @return void
*/
- public function __construct($params)
+ protected function _build_dsn()
{
- parent::__construct($params);
-
- if ( ! empty($this->dsn))
- {
- return;
- }
-
$this->dsn === '' OR $this->dsn = '';
if (strpos($this->hostname, '/') !== FALSE)
@@ -149,6 +139,7 @@ class CI_DB_postgre_driver extends CI_DB {
*/
public function db_connect($persistent = FALSE)
{
+ empty($this->dsn) && $this->_build_dsn();
$this->conn_id = ($persistent === TRUE)
? pg_pconnect($this->dsn)
: pg_connect($this->dsn);
@@ -422,7 +413,7 @@ class CI_DB_postgre_driver extends CI_DB {
{
return 'SELECT "column_name"
FROM "information_schema"."columns"
- WHERE LOWER("table_name") = '.$this->escape(strtolower($table));
+ WHERE "table_schema" = \''.$this->schema.'\' AND LOWER("table_name") = '.$this->escape(strtolower($table));
}
// --------------------------------------------------------------------
@@ -437,7 +428,7 @@ class CI_DB_postgre_driver extends CI_DB {
{
$sql = 'SELECT "column_name", "data_type", "character_maximum_length", "numeric_precision", "column_default"
FROM "information_schema"."columns"
- WHERE LOWER("table_name") = '.$this->escape(strtolower($table));
+ WHERE "table_schema" = \''.$this->schema.'\' AND LOWER("table_name") = '.$this->escape(strtolower($table));
if (($query = $this->query($sql)) === FALSE)
{
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 87fd6b9a8..774a6c3c8 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -140,6 +140,9 @@ Release Date: Not Released
- Improved logging of error conditions in :doc:`CAPTCHA Helper <helpers/captcha_helper>` function :php:func:`create_captcha()`.
- Added ``AUTO_INCREMENT`` support for Oracle 12.1+ to :doc:`Database Forge <database/forge>`.
- Added ``FULL [OUTER] JOIN`` support to :doc:`Query Builder <database/query_builder>`.
+ - Added support for detecting WebP image type to :doc:`File Uploading Library <libraries/file_uploading>`.
+ - Added method :doc:`Database Library <database/index>` method ``trans_active()`` to expose transaction state.
+ - Updated :doc:`Database Library <database/index>` 'pdo' driver to attempt to free resources in order to allow connections to be closed.
Bug fixes for 3.1.12
====================
@@ -149,6 +152,9 @@ Bug fixes for 3.1.12
- Fixed a bug (#5857) - :doc:`Session <libraries/sessions>` data could be corrupted after a concurrent request write with the 'files' driver due to a filesize cache being incorrect.
- Fixed a bug (#5861) - :doc:`Cache Library <libraries/caching>` 'redis' driver would always use phpRedis 5 ``del()`` due to an incorrect version check.
- Fixed a bug (#5879) - :doc:`Profiler Library <general/profiling>` triggered an ``E_DEPRECATED`` warning on PHP 7.4+.
+- Fixed a bug (#5901) - :doc:`Database Library <database/index>` methods ``list_fields()`` and ``field_data()`` ignored the configured table schema on PostgreSQL.
+- Fixed a bug (#5906) - :doc:`Database Library <database/index>` 'postgre' driver couldn't use the failover feature without a ``$config['dsn']``.
+- Fixed a bug (#5903) - :doc:`common function <general/common_functions>` :php:func:`set_status_header()` didn't recognize 'HTTP/2.0' as a valid ``$_SERVER['SERVER_PROTOCOL']``.
Version 3.1.11
==============
diff --git a/user_guide_src/source/database/db_driver_reference.rst b/user_guide_src/source/database/db_driver_reference.rst
index ad53c2bfc..8a4f56784 100644
--- a/user_guide_src/source/database/db_driver_reference.rst
+++ b/user_guide_src/source/database/db_driver_reference.rst
@@ -156,7 +156,7 @@ This article is intended to be a reference for them.
.. php:method:: trans_status()
- :returns: TRUE if the transaction succeeded, FALSE if it failed
+ :returns: TRUE if the transaction succeeded, FALSE if it failed
:rtype: bool
Lets you retrieve the transaction status flag to
diff --git a/user_guide_src/source/installation/upgrade_3112.rst b/user_guide_src/source/installation/upgrade_3112.rst
index 1000010ab..93bcc43d3 100644
--- a/user_guide_src/source/installation/upgrade_3112.rst
+++ b/user_guide_src/source/installation/upgrade_3112.rst
@@ -18,3 +18,9 @@ Step 2: Replace config/user_agents.php
This config file has received some updates. Please copy it to
*application/config/user_agents.php*.
+
+Step 3: Replace config/mimes.php
+================================
+
+This config file has received some updates. Please copy it to
+*application/config/mimes.php*.