We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ddd06b3 commit e0da87bCopy full SHA for e0da87b
test/runtests.jl
@@ -501,6 +501,24 @@ end
501
502
close(conn)
503
end
504
+
505
+ @testset "Wrong COPY TO" begin
506
+ conn = LibPQ.Connection("dbname=postgres user=$DATABASE_USER")
507
508
+ # test CopyOut!
509
+ databuf = IOBuffer()
510
+ copyout = LibPQ.CopyOut!(databuf, "SELECT libpqjl_test;")
511
512
+ result = execute(conn, copyout; throw_error=false)
513
+ @test isopen(result)
514
+ @test status(result) == LibPQ.libpq_c.PGRES_FATAL_ERROR
515
516
+ err_msg = LibPQ.error_message(result)
517
+ @test occursin("ERROR", err_msg)
518
+ close(result)
519
520
+ close(conn)
521
+ end
522
523
524
@testset "LibPQ.Connection" begin
0 commit comments