forked from extern/egroupware
fix for bug #488: Postgres errors when upgrading to 1.4 beta
This commit is contained in:
@ -165,7 +165,7 @@ a different OID if a database must be reloaded. */
|
||||
$cols = $this->MetaColumns($table);
|
||||
$fld = $cols[strtoupper($column)];
|
||||
if ($fld->primary_key && $fld->has_default &&
|
||||
preg_match("/nextval\('([^']+)'::text\)/",$fld->default_value,$matches)) {
|
||||
preg_match("/nextval\('([^']+)'::(text|regclass)\)/",$fld->default_value,$matches)) {
|
||||
$ret = $this->GetOne($sql='SELECT currval('.$this->qstr($matches[1]).')');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user