summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/postgre
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2020-02-11 20:06:14 +0100
committerAndrey Andreev <narf@devilix.net>2020-02-11 20:06:14 +0100
commitac2e0d0c7c1859a2d96ec01c48abd917a36f8f27 (patch)
tree1079fcfe91831ea55573f054a827d8bfed9244e7 /system/database/drivers/postgre
parentfc2da40c4451f61974d11d8d93d532c342d87f83 (diff)
[ci skip] Fix #5901
Diffstat (limited to 'system/database/drivers/postgre')
-rw-r--r--system/database/drivers/postgre/postgre_driver.php4
1 files changed, 2 insertions, 2 deletions
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)
{