summaryrefslogtreecommitdiff
path: root/framework/Data/Common/Pgsql
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Data/Common/Pgsql')
-rw-r--r--framework/Data/Common/Pgsql/TPgsqlMetaData.php3
-rw-r--r--framework/Data/Common/Pgsql/TPgsqlTableInfo.php5
2 files changed, 6 insertions, 2 deletions
diff --git a/framework/Data/Common/Pgsql/TPgsqlMetaData.php b/framework/Data/Common/Pgsql/TPgsqlMetaData.php
index e964cfe7..ac7e6b7a 100644
--- a/framework/Data/Common/Pgsql/TPgsqlMetaData.php
+++ b/framework/Data/Common/Pgsql/TPgsqlMetaData.php
@@ -50,7 +50,7 @@ class TPgsqlMetaData extends TDbMetaData
*/
protected function getSchemaTableName($table)
{
- if(count($parts= explode('.', $table)) > 1)
+ if(count($parts= explode('.', str_replace('"','',$table))) > 1)
return array($parts[0], $parts[1]);
else
return array($this->getDefaultSchema(),$parts[0]);
@@ -171,6 +171,7 @@ EOD;
$columnId = $col['attname']; //use column name as column Id
$info['ColumnName'] = '"'.$columnId.'"'; //quote the column names!
+ $info['ColumnId'] = $columnId;
$info['ColumnIndex'] = $col['index'];
if(!$col['attnotnull'])
$info['AllowNull'] = true;
diff --git a/framework/Data/Common/Pgsql/TPgsqlTableInfo.php b/framework/Data/Common/Pgsql/TPgsqlTableInfo.php
index 88a56635..a2670fe0 100644
--- a/framework/Data/Common/Pgsql/TPgsqlTableInfo.php
+++ b/framework/Data/Common/Pgsql/TPgsqlTableInfo.php
@@ -39,7 +39,10 @@ class TPgsqlTableInfo extends TDbTableInfo
*/
public function getTableFullName()
{
- return $this->getSchemaName().'.'.$this->getTableName();
+ if(($schema=$this->getSchemaName())!==null)
+ return $schema.'.'.$this->getTableName();
+ else
+ $this->getTableName();
}
}