if (strpos($this->type,'date') !== false) return 'NULL';
}
- if (!($db = $this->db())) return "'".preg_replace("/'/","\\'",$value)."'";
+ if (!($db = $this->db())) return "'".preg_replace("/'/","''",$value)."'";
return $db->quote($value);
} else {
$DB_TYPES['pgsql'] = array (
'extra_where' => 'denorm',
'regexp' => '~',
-'quote_name' => '"',
+# NB 04.12.17 'quote_name' => '"',
+# NB 04.12.17 'quote' => function($str) {
+# NB 04.12.17 global $DB_TYPES;
+# NB 04.12.17 $chr = $DB_TYPES['pgsql']['quote_name'];
+# NB 04.12.17 str_replace($chr,$chr.$chr,$str);
+# NB 04.12.17 return $chr . $str . $chr;
+# NB 04.12.17 },
'localFile' => array (getenv('HOME').'/.pgpass','^[^:]+:[^:]+:<D.NAME>:(?P<user>[^:]+):(?<password>[^:]+)'),