File: phpbb/db/tools/postgres.php
Unmodified
Added
Modified
Removed
Line 24 | Line 24 |
---|
* * @return array */
|
* * @return array */
|
public static function get_dbms_type_map()
| static public function get_dbms_type_map()
|
{ return array( 'postgres' => array(
| { return array( 'postgres' => array(
|
Line 94 | Line 94 |
---|
$this->db->sql_freeresult($result);
return $tables;
|
$this->db->sql_freeresult($result);
return $tables;
|
| }
/** * {@inheritDoc} */ function sql_table_exists($table_name) { $sql = "SELECT CAST(EXISTS( SELECT * FROM information_schema.tables WHERE table_schema = 'public' AND table_name = '" . $this->db->sql_escape($table_name) . "' ) AS INTEGER)"; $result = $this->db->sql_query_limit($sql, 1); $row = $this->db->sql_fetchrow($result); $table_exists = (booL) $row['exists']; $this->db->sql_freeresult($result);
return $table_exists;
|
}
/**
| }
/**
|
Line 129 | Line 147 |
---|
if (isset($prepared_column['auto_increment']) && $prepared_column['auto_increment'] && strlen($column_name) > 26) // "${column_name}_gen" {
|
if (isset($prepared_column['auto_increment']) && $prepared_column['auto_increment'] && strlen($column_name) > 26) // "${column_name}_gen" {
|
trigger_error("Index name '${column_name}_gen' on table '$table_name' is too long. The maximum auto increment column length is 26 characters.", E_USER_ERROR);
| trigger_error("Index name '{$column_name}_gen' on table '$table_name' is too long. The maximum auto increment column length is 26 characters.", E_USER_ERROR);
|
}
// here we add the definition of the new column to the list of columns
| }
// here we add the definition of the new column to the list of columns
|