-
-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
char(n) (BPCHAR) length fix #72
Conversation
This now crashes in the PostgresDataDecoder.swift on
with
The actual type it crashes on is now public enum Subscription: Int8, Equatable, Hashable, Codable, CaseIterable {
case unknown = 0
case subscribed = 1
case unsubscribed = 2
} with extension Subscription: DatabaseTypeRepresentable {
public static var databaseType: String { "CHARACTER" }
}
public protocol DatabaseTypeRepresentable {
static var databaseType: String { get }
}
extension Subscription: PostgresDataConvertible { } /cc @calebkleveter |
@tkrajacic can you try From https://dba.stackexchange.com/questions/159090/how-to-store-one-byte-integer-in-postgresql
Either way, the force cast should be fixed obviously. That's in postgres-kit, right? |
As it turns out, Postgres has no 1-byte type really, and even a See https://www.postgresql.org/docs/current/datatype-character.html
There would be an internal type of
|
Merging this since it at least fixes #79. Solutions for Postgres' lack of a good "single byte" type can be discussed further. |
These changes are now available in 1.0.0-beta.2.8 |
The
char(n)
(BPCHAR
) data type now correctly supports values longer than one byte when converting to fixed-width integers or strings (fixes #71, fixes #79, #72).