From ac2e0d0c7c1859a2d96ec01c48abd917a36f8f27 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 11 Feb 2020 21:06:14 +0200 Subject: [ci skip] Fix #5901 --- system/database/drivers/postgre/postgre_driver.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/database/drivers/postgre/postgre_driver.php') diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index 5ce276105..19bd775d0 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -428,7 +428,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)); } // -------------------------------------------------------------------- @@ -443,7 +443,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) { -- cgit v1.2.3-24-g4f1b From e76cd850177fefae34c570e5b49c0ba18955c3b5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 30 Mar 2020 11:37:58 +0300 Subject: [ci skip] Fix #5906 --- system/database/drivers/postgre/postgre_driver.php | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'system/database/drivers/postgre/postgre_driver.php') diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index 19bd775d0..cfd793339 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) OR $this->_build_dsn(); $this->conn_id = ($persistent === TRUE) ? pg_pconnect($this->dsn) : pg_connect($this->dsn); -- cgit v1.2.3-24-g4f1b From 3de79e995faf021fab70b6a82ec57e9fdb0dbedb Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 9 Jul 2020 11:33:52 +0300 Subject: [ci skip] Merge pull request #5970 from sapics/fix/user-guide-url Fix user guide url --- system/database/drivers/postgre/postgre_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/database/drivers/postgre/postgre_driver.php') diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index cfd793339..87b79a89b 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link https://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/userguide3/database/ */ class CI_DB_postgre_driver extends CI_DB { -- cgit v1.2.3-24-g4f1b From 899338a3ea4651533493ffd9d1ce7002e9ddf53e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 9 Jul 2020 11:44:07 +0300 Subject: [ci skip] Correct fix for #5906 --- system/database/drivers/postgre/postgre_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/database/drivers/postgre/postgre_driver.php') diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index 87b79a89b..84717d8b5 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -139,7 +139,7 @@ class CI_DB_postgre_driver extends CI_DB { */ public function db_connect($persistent = FALSE) { - empty($this->dsn) OR $this->_build_dsn(); + empty($this->dsn) && $this->_build_dsn(); $this->conn_id = ($persistent === TRUE) ? pg_pconnect($this->dsn) : pg_connect($this->dsn); -- cgit v1.2.3-24-g4f1b