Permalink
Browse files

(Fixes issue 1231)

  • Loading branch information...
1 parent 775a693 commit 515c598ce4afada2732d83bf340af582ff7cdfea qiang.xue committed Jun 25, 2010
Showing with 2 additions and 1 deletion.
  1. +1 −0 CHANGELOG
  2. +1 −1 framework/db/schema/pgsql/CPgsqlColumnSchema.php
View
@@ -18,6 +18,7 @@ Version 1.1.3 to be released
- Bug #1213: Fixed the bug that skipOnError doesn't have effect on inline validators (Qiang)
- Bug #1226: CWebUser::autoRenewCookie does not handle the case when the user is already logged in (Qiang)
- Bug #1227: CActiveRecord::resetScope doesn't work with default scope (Sam Dark)
+- Bug #1231: CPgsqlColumnSchema may incorrectly parse the default column when DB expression is used (Qiang)
- Bug #1241: DB search parameters should have special characters escaped (Qiang)
- Bug #1242: Fixed the bug that CGridView filtering and item deletion would not work when ajax-update is disabled (Qiang)
- Bug #1252: CJSON::encode() was not able to encode models and model arrays (Sam Dark)
@@ -49,7 +49,7 @@ protected function extractDefault($defaultValue)
$this->defaultValue=false;
else if(strpos($defaultValue,'nextval')===0)
$this->defaultValue=null;
- else if(preg_match('/\'(.*)\'::/',$defaultValue,$matches))
+ else if(preg_match('/^\'(.*)\'::/',$defaultValue,$matches))
$this->defaultValue=$this->typecast(str_replace("''","'",$matches[1]));
else if(preg_match('/^-?\d+(\.\d*)?$/',$defaultValue,$matches))
$this->defaultValue=$this->typecast($defaultValue);

0 comments on commit 515c598

Please sign in to comment.