diff options
author | wei <> | 2007-10-08 00:59:27 +0000 |
---|---|---|
committer | wei <> | 2007-10-08 00:59:27 +0000 |
commit | c31900c9c909f42b722bfb03b164d548b602cdd4 (patch) | |
tree | 43c6972ef58134aede5a99880740a1dfa0bd0060 /framework/Data/Common/Pgsql | |
parent | b7a0c37ad82ef4dcfb031643434538d600e37757 (diff) |
Fixed #716
Diffstat (limited to 'framework/Data/Common/Pgsql')
-rw-r--r-- | framework/Data/Common/Pgsql/TPgsqlMetaData.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/framework/Data/Common/Pgsql/TPgsqlMetaData.php b/framework/Data/Common/Pgsql/TPgsqlMetaData.php index 9b6a5cdf..80c38d60 100644 --- a/framework/Data/Common/Pgsql/TPgsqlMetaData.php +++ b/framework/Data/Common/Pgsql/TPgsqlMetaData.php @@ -330,6 +330,7 @@ EOD; */
protected function getPrimaryKeys($tableName, $schemaName, $columnIndex)
{
+ $index = join(', ', split(' ', $columnIndex));
$sql =
<<<EOD
SELECT attnum, attname FROM pg_catalog.pg_attribute WHERE
@@ -338,13 +339,12 @@ EOD; SELECT oid FROM pg_catalog.pg_namespace WHERE nspname=:schema
)
)
- AND attnum IN (:columnIndex)
+ AND attnum IN ({$index})
EOD;
$command = $this->getDbConnection()->createCommand($sql);
$command->bindValue(':table', $tableName);
$command->bindValue(':schema', $schemaName);
- $command->bindValue(':columnIndex', join('\',\'', split(' ', $columnIndex)));
-
+// $command->bindValue(':columnIndex', join(', ', split(' ', $columnIndex)));
$primary = array();
foreach($command->query() as $row)
{
|