Closed lpil closed 1 year ago
Huh, it seems to be saying it can't match do
to {Command, NumRows}
but I don't see how decode_tag
couldn't return a tuple..
Need a type checker!
Yeah, weird eh? I couldn't work out what was going on there either.
What version are you on? I just added to the test suite and it worked:
?assertMatch(#{command := do},
pgo:query("do $$ begin insert into foo_range (id, some_range) values (1, '[1,3]'); insert into foo_range (id, some_range) values (3, '[4,8]'); end $$")
),
Oops, should have included that. I'm on v0.13.0.
My Gleam wrapper is using pgo:query(Sql, Arguments, #{pool => Name})
, but otherwise it looks like the same thing. I've got to stop working now and get ready for a wedding I'm attending in the morning, but if you don't find the problem before I'm back I'll try and make a minimal reproduction for you.
Oh, this was fixed shortly after 0.13.0 :) https://github.com/erleans/pgo/pull/64/files
I'll make a new release today.
Wicked, thank you!
Published 0.14.0
Hello!
If I execute this statement:
pgo crashes after successfully running the statement.
The line in question:
https://github.com/erleans/pgo/blob/d1989c44f41ccf1b4e670ccafe46d43f71cb6dfc/src/pgo_handler.erl#L462
The crash happens after the statement runs, so the rows are successfully inserted.
Related to #68
Thanks, Louis