Skip to content

Commit ae714f0

Browse files
committed
- Fixed deprecated functions: bytestring to unsafe_string, is to ===, symbol to Symbol
- Compat.ASCIIString for pgtype, pgdata
1 parent a29b45f commit ae714f0

File tree

9 files changed

+99
-88
lines changed

9 files changed

+99
-88
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ end
4545
## Requirements
4646

4747
* [DBI.jl](https://github.com/JuliaDB/DBI.jl)
48-
* [DataFrames.jl](https://github.com/JuliaStats/DataFrames.jl) >= v0.5.7
49-
* [DataArrays.jl](https://github.com/JuliaStats/DataArrays.jl) >= v0.1.2
48+
* [DataFrames.jl](https://github.com/JuliaStats/DataFrames.jl) >= v0.8.0
49+
* [DataArrays.jl](https://github.com/JuliaStats/DataArrays.jl) >= v0.3.4 for Julia 0.4, v0.3.8 for Julia 0.5
5050
* libpq shared library (comes with a standard PostgreSQL client installation)
5151
* Julia 0.4
5252

REQUIRE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
julia 0.4
2-
DataFrames 0.6.6
2+
DataFrames 0.8.0
33
DataArrays
44
Compat
55
JSON

deps/build.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using BinDeps
2+
import Compat: @static, is_apple
23

34
@BinDeps.setup
45

@@ -18,7 +19,7 @@ provides(Yum, "libpq5", libpq)
1819
provides(Yum, "postgresql-libs", libpq)
1920
provides(Pacman, "postgresql-libs", libpq)
2021

21-
@osx_only begin
22+
@static if is_apple()
2223
using Homebrew
2324
provides(Homebrew.HB, "postgresql", libpq, os=:Darwin)
2425
end

src/dbi_impl.jl

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
import Compat: Libc, @compat
1+
import Compat: Libc, @static, is_windows
22

33
function Base.connect(::Type{Postgres},
4-
host::AbstractString="",
5-
user::AbstractString="",
6-
passwd::AbstractString="",
7-
db::AbstractString="",
4+
host::AbstractString,
5+
user::AbstractString,
6+
passwd::AbstractString,
7+
db::AbstractString,
88
port::AbstractString="")
99
conn = PQsetdbLogin(host, port, C_NULL, C_NULL, db, user, passwd)
1010
status = PQstatus(conn)
1111

1212
if status != CONNECTION_OK
13-
errmsg = bytestring(PQerrorMessage(conn))
13+
errmsg = unsafe_string(PQerrorMessage(conn))
1414
PQfinish(conn)
1515
error(errmsg)
1616
end
@@ -36,7 +36,7 @@ function Base.connect(::Type{Postgres};
3636
conn = PQconnectdb(dsn)
3737
status = PQstatus(conn)
3838
if status != CONNECTION_OK
39-
errmsg = bytestring(PQerrorMessage(conn))
39+
errmsg = unsafe_string(PQerrorMessage(conn))
4040
PQfinish(conn)
4141
error(errmsg)
4242
end
@@ -60,15 +60,15 @@ function DBI.errcode(db::PostgresDatabaseHandle)
6060
end
6161

6262
function DBI.errstring(db::PostgresDatabaseHandle)
63-
return bytestring(PQerrorMessage(db.ptr))
63+
return unsafe_string(PQerrorMessage(db.ptr))
6464
end
6565

6666
function DBI.errcode(res::PostgresResultHandle)
6767
return PQresultStatus(res.ptr)
6868
end
6969

7070
function DBI.errstring(res::PostgresResultHandle)
71-
return bytestring(PQresultErrorMessage(res.ptr))
71+
return unsafe_string(PQresultErrorMessage(res.ptr))
7272
end
7373

7474
DBI.errcode(stmt::PostgresStatementHandle) = DBI.errcode(stmt.result)
@@ -79,8 +79,8 @@ function checkerrclear(result::Ptr{PGresult})
7979

8080
try
8181
if status == PGRES_FATAL_ERROR
82-
statustext = bytestring(PQresStatus(status))
83-
errmsg = bytestring(PQresultErrorMessage(result))
82+
statustext = unsafe_string(PQresStatus(status))
83+
errmsg = unsafe_string(PQresultErrorMessage(result))
8484
error("$statustext: $errmsg")
8585
end
8686
finally
@@ -89,18 +89,17 @@ function checkerrclear(result::Ptr{PGresult})
8989
end
9090

9191
escapeliteral(db::PostgresDatabaseHandle, value) = value
92-
escapeliteral(db::PostgresDatabaseHandle, value::AbstractString) = escapeliteral(db, bytestring(value))
9392

94-
function escapeliteral(db::PostgresDatabaseHandle, value::Union{ASCIIString, UTF8String})
93+
function escapeliteral(db::PostgresDatabaseHandle, value::AbstractString)
9594
strptr = PQescapeLiteral(db.ptr, value, sizeof(value))
96-
str = bytestring(strptr)
95+
str = unsafe_string(strptr)
9796
PQfreemem(strptr)
9897
return str
9998
end
10099

101-
function escapeidentifier(db::PostgresDatabaseHandle, value::Union{ASCIIString, UTF8String})
100+
function escapeidentifier(db::PostgresDatabaseHandle, value::AbstractString)
102101
strptr = PQescapeIdentifier(db.ptr, value, sizeof(value))
103-
str = bytestring(strptr)
102+
str = unsafe_string(strptr)
104103
PQfreemem(strptr)
105104
return str
106105
end
@@ -109,8 +108,8 @@ Base.run(db::PostgresDatabaseHandle, sql::AbstractString) = checkerrclear(PQexec
109108

110109
function checkcopyreturnval(db::PostgresDatabaseHandle, returnval::Int32)
111110
if returnval == -1
112-
errcode = bytestring(DBI.errcode(db))
113-
errmsg = bytestring(DBI.errmsg(db))
111+
errcode = unsafe_string(DBI.errcode(db))
112+
errmsg = unsafe_string(DBI.errmsg(db))
114113
error("Error $errcode: $errmsg")
115114
end
116115
end
@@ -131,14 +130,14 @@ function copy_from(db::PostgresDatabaseHandle, table::AbstractString,
131130
return checkerrclear(PQgetResult(db.ptr))
132131
end
133132

134-
hashsql(sql::AbstractString) = bytestring(string("__", hash(sql), "__"))
133+
hashsql(sql::AbstractString) = unsafe_string(string("__", hash(sql), "__"))
135134

136135
function getparamtypes(result::Ptr{PGresult})
137136
nparams = PQnparams(result)
138-
return @compat [pgtype(OID{Int(PQparamtype(result, i-1))}) for i = 1:nparams]
137+
return [pgtype(OID{Int(PQparamtype(result, i-1))}) for i = 1:nparams]
139138
end
140139

141-
LIBC = @windows ? "msvcrt.dll" : :libc
140+
LIBC = @static is_windows() ? "msvcrt.dll" : :libc
142141
strlen(ptr::Ptr{UInt8}) = ccall((:strlen, LIBC), Csize_t, (Ptr{UInt8},), ptr)
143142

144143
function getparams!(ptrs::Vector{Ptr{UInt8}}, params, types, sizes, lengths::Vector{Int32}, nulls)
@@ -281,9 +280,9 @@ function unsafe_fetchrow(result::PostgresResultHandle, rownum::Integer)
281280
end
282281

283282
function unsafe_fetchcol_dataarray(result::PostgresResultHandle, colnum::Integer)
284-
return @data([PQgetisnull(result.ptr, i, colnum) == 1 ? NA :
283+
return Any[PQgetisnull(result.ptr, i, colnum) == 1 ? NA :
285284
jldata(result.types[colnum+1], PQgetvalue(result.ptr, i, colnum))
286-
for i = 0:(PQntuples(result.ptr)-1)])
285+
for i = 0:(PQntuples(result.ptr)-1)]
287286
end
288287

289288
function DBI.fetchall(result::PostgresResultHandle)
@@ -293,7 +292,7 @@ end
293292
function DBI.fetchdf(result::PostgresResultHandle)
294293
df = DataFrame()
295294
for i = 0:(length(result.types)-1)
296-
df[symbol(bytestring(PQfname(result.ptr, i)))] = unsafe_fetchcol_dataarray(result, i)
295+
df[Symbol(unsafe_string(PQfname(result.ptr, i)))] = unsafe_fetchcol_dataarray(result, i)
297296
end
298297

299298
return df

src/libpq_common.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
macro c(ret_type, func, arg_types, lib)
2-
local args_in = Any[ symbol(string('a',x)) for x in 1:length(arg_types.args) ]
2+
local args_in = Any[ Symbol(string('a',x)) for x in 1:length(arg_types.args) ]
33
quote
44
$(esc(func))($(args_in...)) = ccall( ($(string(func)), $(Expr(:quote, lib)) ),
55
$ret_type, $arg_types, $(args_in...) )

src/libpq_interface.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,6 @@ module libpq_interface
124124
@c Cint fscanf (Ptr{FILE}, Ptr{UInt8}) libpq
125125
@c Cint scanf (Ptr{UInt8},) libpq
126126
@c Cint sscanf (Ptr{UInt8}, Ptr{UInt8}) libpq
127-
@c Cint fscanf (Ptr{FILE}, Ptr{UInt8}) libpq
128-
@c Cint scanf (Ptr{UInt8},) libpq
129-
@c Cint sscanf (Ptr{UInt8}, Ptr{UInt8}) libpq
130127
@c Cint fgetc (Ptr{FILE},) libpq
131128
@c Cint getc (Ptr{FILE},) libpq
132129
@c Cint getchar () libpq

src/types.jl

Lines changed: 60 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import DataArrays: NAtype
22
import JSON
3-
import Compat: Libc, unsafe_convert, parse, @compat
3+
import Compat: Libc, unsafe_convert, parse, @compat, String, unsafe_string
44

55
abstract AbstractPostgresType
66
type PostgresType{Name} <: AbstractPostgresType end
@@ -9,7 +9,30 @@ abstract AbstractOID
99
type OID{N} <: AbstractOID end
1010

1111
oid{T<:AbstractPostgresType}(t::Type{T}) = convert(OID, t)
12-
pgtype(t::Type) = convert(PostgresType, t)
12+
13+
if VERSION < v"0.5-dev+4194"
14+
import Compat
15+
16+
function pgtype(t::Type)
17+
if t <: Compat.ASCIIString
18+
convert(PostgresType, String)
19+
elseif t <: Vector{Compat.ASCIIString}
20+
convert(PostgresType, Vector{String})
21+
else
22+
convert(PostgresType, t)
23+
end
24+
end
25+
26+
function pgdata(::Type{PostgresType{:_varchar}}, ptr::Ptr{UInt8}, data::Vector{Compat.ASCIIString})
27+
ptr = storestring!(ptr, string("{", join(data, ','), "}"))
28+
end
29+
30+
function pgdata(::Type{PostgresType{:_text}}, ptr::Ptr{UInt8}, data::Vector{Compat.ASCIIString})
31+
ptr = storestring!(ptr, string("{", join(data, ','), "}"))
32+
end
33+
else
34+
pgtype(t::Type) = convert(PostgresType, t)
35+
end
1336

1437
Base.convert{T}(::Type{Oid}, ::Type{OID{T}}) = convert(Oid, T)
1538

@@ -18,6 +41,7 @@ function newpgtype(pgtypename, oid, jltypes)
1841
Base.convert(::Type{PostgresType}, ::Type{OID{oid}}) = PostgresType{pgtypename}
1942

2043
for t in jltypes
44+
pgtypename in [:jsonb, :_text] && continue
2145
Base.convert(::Type{PostgresType}, ::Type{t}) = PostgresType{pgtypename}
2246
end
2347
end
@@ -33,7 +57,7 @@ newpgtype(:int2, 21, (Int16,))
3357
newpgtype(:float8, 701, (Float64,))
3458
newpgtype(:float4, 700, (Float32,))
3559
newpgtype(:bpchar, 1042, ())
36-
newpgtype(:varchar, 1043, (ASCIIString,UTF8String))
60+
newpgtype(:varchar, 1043, (String,))
3761
newpgtype(:text, 25, ())
3862
newpgtype(:numeric, 1700, (BigInt,BigFloat))
3963
newpgtype(:date, 1082, ())
@@ -50,8 +74,8 @@ newpgtype(:_int4, 1007, (Vector{Int32},))
5074
newpgtype(:_int2, 1005, (Vector{Int16},))
5175
newpgtype(:_float8, 1022, (Vector{Float64},))
5276
newpgtype(:_float4, 1021, (Vector{Float32},))
53-
newpgtype(:_varchar, 1015, (Vector{ASCIIString}, Vector{UTF8String}))
54-
newpgtype(:_text, 1009, (Vector{ASCIIString}, Vector{UTF8String}))
77+
newpgtype(:_varchar, 1015, (Vector{String},))
78+
newpgtype(:_text, 1009, (Vector{String},))
5579

5680

5781
typealias PGStringTypes Union{Type{PostgresType{:bpchar}},
@@ -74,54 +98,54 @@ function decode_bytea_hex(s::AbstractString)
7498
return hex2bytes(s[3:end])
7599
end
76100

77-
jldata(::Type{PostgresType{:date}}, ptr::Ptr{UInt8}) = bytestring(ptr)
101+
jldata(::Type{PostgresType{:date}}, ptr::Ptr{UInt8}) = unsafe_string(ptr)
78102

79-
jldata(::Type{PostgresType{:timestamp}}, ptr::Ptr{UInt8}) = bytestring(ptr)
103+
jldata(::Type{PostgresType{:timestamp}}, ptr::Ptr{UInt8}) = unsafe_string(ptr)
80104

81-
jldata(::Type{PostgresType{:timestamptz}}, ptr::Ptr{UInt8}) = bytestring(ptr)
105+
jldata(::Type{PostgresType{:timestamptz}}, ptr::Ptr{UInt8}) = unsafe_string(ptr)
82106

83-
jldata(::Type{PostgresType{:bool}}, ptr::Ptr{UInt8}) = bytestring(ptr) != "f"
107+
jldata(::Type{PostgresType{:bool}}, ptr::Ptr{UInt8}) = unsafe_string(ptr) != "f"
84108

85-
jldata(::Type{PostgresType{:int8}}, ptr::Ptr{UInt8}) = parse(Int64, bytestring(ptr))
109+
jldata(::Type{PostgresType{:int8}}, ptr::Ptr{UInt8}) = parse(Int64, unsafe_string(ptr))
86110

87-
jldata(::Type{PostgresType{:int4}}, ptr::Ptr{UInt8}) = parse(Int32, bytestring(ptr))
111+
jldata(::Type{PostgresType{:int4}}, ptr::Ptr{UInt8}) = parse(Int32, unsafe_string(ptr))
88112

89-
jldata(::Type{PostgresType{:int2}}, ptr::Ptr{UInt8}) = parse(Int16, bytestring(ptr))
113+
jldata(::Type{PostgresType{:int2}}, ptr::Ptr{UInt8}) = parse(Int16, unsafe_string(ptr))
90114

91-
jldata(::Type{PostgresType{:float8}}, ptr::Ptr{UInt8}) = parse(Float64, bytestring(ptr))
115+
jldata(::Type{PostgresType{:float8}}, ptr::Ptr{UInt8}) = parse(Float64, unsafe_string(ptr))
92116

93-
jldata(::Type{PostgresType{:float4}}, ptr::Ptr{UInt8}) = parse(Float32, bytestring(ptr))
117+
jldata(::Type{PostgresType{:float4}}, ptr::Ptr{UInt8}) = parse(Float32, unsafe_string(ptr))
94118

95119
function jldata(::Type{PostgresType{:numeric}}, ptr::Ptr{UInt8})
96-
s = bytestring(ptr)
120+
s = unsafe_string(ptr)
97121
return parse(search(s, '.') == 0 ? BigInt : BigFloat, s)
98122
end
99123

100-
jldata(::PGStringTypes, ptr::Ptr{UInt8}) = bytestring(ptr)
124+
jldata(::PGStringTypes, ptr::Ptr{UInt8}) = unsafe_string(ptr)
101125

102-
jldata(::Type{PostgresType{:bytea}}, ptr::Ptr{UInt8}) = bytestring(ptr) |> decode_bytea_hex
126+
jldata(::Type{PostgresType{:bytea}}, ptr::Ptr{UInt8}) = unsafe_string(ptr) |> decode_bytea_hex
103127

104128
jldata(::Type{PostgresType{:unknown}}, ptr::Ptr{UInt8}) = Union{}
105129

106-
jldata(::Type{PostgresType{:json}}, ptr::Ptr{UInt8}) = JSON.parse(bytestring(ptr))
130+
jldata(::Type{PostgresType{:json}}, ptr::Ptr{UInt8}) = JSON.parse(unsafe_string(ptr))
107131

108-
jldata(::Type{PostgresType{:jsonb}}, ptr::Ptr{UInt8}) = JSON.parse(bytestring(ptr))
132+
jldata(::Type{PostgresType{:jsonb}}, ptr::Ptr{UInt8}) = JSON.parse(unsafe_string(ptr))
109133

110-
jldata(::Type{PostgresType{:_bool}}, ptr::Ptr{UInt8}) = map(x -> x != "f", split(bytestring(ptr)[2:end-1], ','))
134+
jldata(::Type{PostgresType{:_bool}}, ptr::Ptr{UInt8}) = map(x -> x != "f", split(unsafe_string(ptr)[2:end-1], ','))
111135

112-
jldata(::Type{PostgresType{:_int8}}, ptr::Ptr{UInt8}) = map(x -> parse(Int64, x), split(bytestring(ptr)[2:end-1], ','))
136+
jldata(::Type{PostgresType{:_int8}}, ptr::Ptr{UInt8}) = map(x -> parse(Int64, x), split(unsafe_string(ptr)[2:end-1], ','))
113137

114-
jldata(::Type{PostgresType{:_int4}}, ptr::Ptr{UInt8}) = map(x -> parse(Int32, x), split(bytestring(ptr)[2:end-1], ','))
138+
jldata(::Type{PostgresType{:_int4}}, ptr::Ptr{UInt8}) = map(x -> parse(Int32, x), split(unsafe_string(ptr)[2:end-1], ','))
115139

116-
jldata(::Type{PostgresType{:_int2}}, ptr::Ptr{UInt8}) = map(x -> parse(Int16, x), split(bytestring(ptr)[2:end-1], ','))
140+
jldata(::Type{PostgresType{:_int2}}, ptr::Ptr{UInt8}) = map(x -> parse(Int16, x), split(unsafe_string(ptr)[2:end-1], ','))
117141

118-
jldata(::Type{PostgresType{:_float8}}, ptr::Ptr{UInt8}) = map(x -> parse(Float64, x), split(bytestring(ptr)[2:end-1], ','))
142+
jldata(::Type{PostgresType{:_float8}}, ptr::Ptr{UInt8}) = map(x -> parse(Float64, x), split(unsafe_string(ptr)[2:end-1], ','))
119143

120-
jldata(::Type{PostgresType{:_float4}}, ptr::Ptr{UInt8}) = map(x -> parse(Float32, x), split(bytestring(ptr)[2:end-1], ','))
144+
jldata(::Type{PostgresType{:_float4}}, ptr::Ptr{UInt8}) = map(x -> parse(Float32, x), split(unsafe_string(ptr)[2:end-1], ','))
121145

122-
jldata(::Type{PostgresType{:_varchar}}, ptr::Ptr{UInt8}) = convert(Vector{AbstractString}, split(bytestring(ptr)[2:end-1], ','))
146+
jldata(::Type{PostgresType{:_varchar}}, ptr::Ptr{UInt8}) = convert(Vector{AbstractString}, split(unsafe_string(ptr)[2:end-1], ','))
123147

124-
jldata(::Type{PostgresType{:_text}}, ptr::Ptr{UInt8}) = convert(Vector{AbstractString}, split(bytestring(ptr)[2:end-1], ','))
148+
jldata(::Type{PostgresType{:_text}}, ptr::Ptr{UInt8}) = convert(Vector{AbstractString}, split(unsafe_string(ptr)[2:end-1], ','))
125149

126150
function pgdata(::Type{PostgresType{:bool}}, ptr::Ptr{UInt8}, data::Bool)
127151
ptr = data ? storestring!(ptr, "TRUE") : storestring!(ptr, "FALSE")
@@ -151,41 +175,37 @@ function pgdata(::Type{PostgresType{:numeric}}, ptr::Ptr{UInt8}, data::Number)
151175
ptr = storestring!(ptr, string(data))
152176
end
153177

154-
function pgdata(::PGStringTypes, ptr::Ptr{UInt8}, data::ByteString)
155-
ptr = storestring!(ptr, data)
156-
end
157-
158178
function pgdata(::PGStringTypes, ptr::Ptr{UInt8}, data::AbstractString)
159-
ptr = storestring!(ptr, bytestring(data))
179+
ptr = storestring!(ptr, data)
160180
end
161181

162182
function pgdata(::PostgresType{:date}, ptr::Ptr{UInt8}, data::AbstractString)
163-
ptr = storestring!(ptr, bytestring(data))
183+
ptr = storestring!(ptr, data)
164184
ptr = Dates.DateFormat(ptr)
165185
end
166186

167187
function pgdata(::PostgresType{:timestamp}, ptr::Ptr{UInt8}, data::AbstractString)
168-
ptr = storestring!(ptr, bytestring(data))
188+
ptr = storestring!(ptr, data)
169189
end
170190

171191
function pgdata(::PostgresType{:timestamptz}, ptr::Ptr{UInt8}, data::AbstractString)
172-
ptr = storestring!(ptr, bytestring(data))
192+
ptr = storestring!(ptr, data)
173193
end
174194

175195
function pgdata(::Type{PostgresType{:bytea}}, ptr::Ptr{UInt8}, data::Vector{UInt8})
176-
ptr = storestring!(ptr, bytestring("\\x", bytes2hex(data)))
196+
ptr = storestring!(ptr, string("\\x", bytes2hex(data)))
177197
end
178198

179199
function pgdata(::Type{PostgresType{:unknown}}, ptr::Ptr{UInt8}, data)
180200
ptr = storestring!(ptr, string(data))
181201
end
182202

183203
function pgdata{T<:AbstractString}(::Type{PostgresType{:json}}, ptr::Ptr{UInt8}, data::Dict{T,Any})
184-
ptr = storestring!(ptr, bytestring(JSON.json(data)))
204+
ptr = storestring!(ptr, JSON.json(data))
185205
end
186206

187207
function pgdata{T<:AbstractString}(::Type{PostgresType{:jsonb}}, ptr::Ptr{UInt8}, data::Dict{T,Any})
188-
ptr = storestring!(ptr, bytestring(JSON.json(data)))
208+
ptr = storestring!(ptr, JSON.json(data))
189209
end
190210

191211
function pgdata(::Type{PostgresType{:_bool}}, ptr::Ptr{UInt8}, data::Vector{Bool})
@@ -212,19 +232,11 @@ function pgdata(::Type{PostgresType{:_float4}}, ptr::Ptr{UInt8}, data::Vector{Fl
212232
ptr = storestring!(ptr, string("{", join(data, ','), "}"))
213233
end
214234

215-
function pgdata(::Type{PostgresType{:_varchar}}, ptr::Ptr{UInt8}, data::Vector{ASCIIString})
216-
ptr = storestring!(ptr, string("{", join(data, ','), "}"))
217-
end
218-
219-
function pgdata(::Type{PostgresType{:_varchar}}, ptr::Ptr{UInt8}, data::Vector{UTF8String})
220-
ptr = storestring!(ptr, string("{", join(data, ','), "}"))
221-
end
222-
223-
function pgdata(::Type{PostgresType{:_text}}, ptr::Ptr{UInt8}, data::Vector{ASCIIString})
235+
function pgdata(::Type{PostgresType{:_varchar}}, ptr::Ptr{UInt8}, data::Vector{String})
224236
ptr = storestring!(ptr, string("{", join(data, ','), "}"))
225237
end
226238

227-
function pgdata(::Type{PostgresType{:_text}}, ptr::Ptr{UInt8}, data::Vector{UTF8String})
239+
function pgdata(::Type{PostgresType{:_text}}, ptr::Ptr{UInt8}, data::Vector{String})
228240
ptr = storestring!(ptr, string("{", join(data, ','), "}"))
229241
end
230242

0 commit comments

Comments
 (0)