We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c8b01a3 commit 61192d2Copy full SHA for 61192d2
Sources/PostgreSQL/Data/PostgreSQLData+String.swift
@@ -48,7 +48,7 @@ extension String: PostgreSQLDataConvertible {
48
49
/// depending on our offset, append the string to before or after the decimal point
50
if offset < metadata.weight.bigEndian + 1 {
51
- integer += string
+ integer += offset == 0 ? string : String(repeating: "0", count: 4 - string.count) + string
52
} else {
53
// Leading zeros matter with fractional
54
fractional += fractional.count == 0 ? String(repeating: "0", count: 4 - string.count) + string : string
0 commit comments