Skip to content

Commit 6c69fab

Browse files
authored
fix(postgresql): Use template0 to fix database creation failure (#950)
1 parent ce6dae3 commit 6c69fab

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6666
- Connection form: `usePrivateKey=true` from URL no longer disables Test/Create buttons
6767
- Transient connections from URL clean up keychain entries on connection failure
6868
- Native Search Field focus regression when clearing text
69+
- Using the template0 database to resolve database creation failures in PostgreSQL
6970

7071
## [0.36.0] - 2026-04-27
7172

Plugins/PostgreSQLDriverPlugin/PostgreSQLPluginDriver.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ final class PostgreSQLPluginDriver: PluginDatabaseDriver, @unchecked Sendable {
837837
throw LibPQPluginError(message: "Invalid collation", sqlState: nil, detail: nil)
838838
}
839839
let escapedCollation = collation.replacingOccurrences(of: "'", with: "''")
840-
query += " LC_COLLATE '\(escapedCollation)'"
840+
query += " TEMPLATE 'template0' LC_COLLATE '\(escapedCollation)'"
841841
}
842842
_ = try await execute(query: query)
843843
}

0 commit comments

Comments
 (0)