Skip to content

Commit c60fbed

Browse files
committed
fix: properly quote table names with schema definition (#84)
1 parent 8a295c4 commit c60fbed

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"codeception/codeception": "*@dev"
2323
},
2424
"require-dev": {
25+
"behat/gherkin": "~4.10.0",
2526
"squizlabs/php_codesniffer": "*"
2627
},
2728
"conflict": {

src/Codeception/Lib/Driver/PostgreSql.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public function getPrimaryKey(string $tableName): array
164164
FROM pg_index i
165165
JOIN pg_attribute a ON a.attrelid = i.indrelid
166166
AND a.attnum = ANY(i.indkey)
167-
WHERE i.indrelid = '\"{$tableName}\"'::regclass
167+
WHERE i.indrelid = " . $this->getQuotedName($tableName) . "::regclass
168168
AND i.indisprimary";
169169
$stmt = $this->executeQuery($query, []);
170170
$columns = $stmt->fetchAll(PDO::FETCH_ASSOC);

0 commit comments

Comments
 (0)