File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ is not in UTF-8.
101
101
bytes_view (pqv:: PQValue ) = unsafe_wrap (Vector{UInt8}, data_pointer (pqv), num_bytes (pqv) + 1 )
102
102
103
103
Base. String (pqv:: PQValue ) = unsafe_string (pqv)
104
+ Base. parse (:: Type{String} , pqv:: PQValue ) = unsafe_string (pqv)
104
105
Base. convert (:: Type{String} , pqv:: PQValue ) = String (pqv)
105
106
Base. length (pqv:: PQValue ) = length (string_view (pqv))
106
107
Base. lastindex (pqv:: PQValue ) = lastindex (string_view (pqv))
@@ -153,8 +154,8 @@ _DEFAULT_TYPE_MAP[:numeric] = Decimal
153
154
154
155
# # character
155
156
# bpchar is char(n)
156
- function pqparse (:: Type{String} , str :: AbstractString )
157
- return String (rstrip (str , ' ' ))
157
+ function Base . parse (:: Type{String} , pqv :: PQValue{PQ_SYSTEM_TYPES[:bpchar]} )
158
+ return String (rstrip (string_view (pqv) , ' ' ))
158
159
end
159
160
# char is "char"
160
161
_DEFAULT_TYPE_MAP[:char ] = PQChar
Original file line number Diff line number Diff line change @@ -1101,6 +1101,8 @@ end
1101
1101
(" E'\\\\ 001'::bytea" , UInt8[0o001 ]),
1102
1102
(" E'\\\\ 176'::bytea" , UInt8[0o176 ]),
1103
1103
(" 'hello'::char(10)" , " hello" ),
1104
+ (" 'hello '::char(10)" , " hello" ),
1105
+ (" 'hello '::varchar(10)" , " hello " ),
1104
1106
(" '3'::\" char\" " , LibPQ. PQChar (' 3' )),
1105
1107
(" 't'::bool" , true ),
1106
1108
(" 'T'::bool" , true ),
You can’t perform that action at this time.
0 commit comments