Answer the question
In order to leave comments, you need to log in
Yii active record and user-defined types in postgres?
I really like postgres for the richest functionality, including user-defined types. I wonder how Active Record works with them in yii, in particular CDbCriteria.
Answer the question
In order to leave comments, you need to log in
Judging by the sources, all user-defined data types are translated into a string
protected function extractType($dbType)
{
if(strpos($dbType,'[')!==false || strpos($dbType,'char')!==false || strpos($dbType,'text')!==false)
$this->type='string';
else if(strpos($dbType,'bool')!==false)
$this->type='boolean';
else if(preg_match('/(real|float|double)/',$dbType))
$this->type='double';
else if(preg_match('/(integer|oid|serial|smallint)/',$dbType))
$this->type='integer';
else
$this->type='string';
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question