summaryrefslogtreecommitdiffstats
path: root/system/drivers/DB_postgre.php
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-08-26 21:28:37 +0200
committeradmin <devnull@localhost>2006-08-26 21:28:37 +0200
commitb071bb5a92aade551345a495fb13f5678f3978d0 (patch)
tree803575f71b327ad5782206331d82bf5c6dfc0cc0 /system/drivers/DB_postgre.php
parente07fbb376a741e21e69a182eada322c4d3b7e62e (diff)
Diffstat (limited to 'system/drivers/DB_postgre.php')
-rw-r--r--system/drivers/DB_postgre.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/system/drivers/DB_postgre.php b/system/drivers/DB_postgre.php
index 01d4b3df0..3829b04af 100644
--- a/system/drivers/DB_postgre.php
+++ b/system/drivers/DB_postgre.php
@@ -94,7 +94,7 @@ class CI_DB_postgre extends CI_DB {
* @param string an SQL query
* @return string
*/
- function &_prep_query($sql)
+ function _prep_query($sql)
{
return $sql;
}
@@ -174,7 +174,7 @@ class CI_DB_postgre extends CI_DB {
if ($table == '')
return '0';
- $query = $this->query("SELECT COUNT(*) AS numrows FROM `".$this->dbprefix.$table."`");
+ $query = $this->query("SELECT COUNT(*) AS numrows FROM ".$this->dbprefix.$table."");
if ($query->num_rows() == 0)
return '0';
@@ -225,7 +225,7 @@ class CI_DB_postgre extends CI_DB {
{
if (stristr($table, '.'))
{
- $table = preg_replace("/\./", "`.`", $table);
+ $table = preg_replace("/\./", ".", $table);
}
return $table;
@@ -432,7 +432,7 @@ class CI_DB_postgre_result extends CI_DB_result {
$F->name = pg_field_name($this->result_id, $i);
$F->type = pg_field_type($this->result_id, $i);
$F->max_length = pg_field_size($this->result_id, $i);
- $F->primary_key = 0;
+ $F->primary_key = $i == 0;
$F->default = '';
$retval[] = $F;