Skip to content

Commit e9a35e9

Browse files
committed
fix: forward bufsize option in export/3 recursive call
When export/3 is called without :into, it opens a StringIO buffer and recurses with into: set. The bufsize option was not forwarded, causing LargeObject.open/3 to silently fall back to the 65_536 default instead of using the configured value.
1 parent 0b92ac4 commit e9a35e9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/pg_large_objects.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ defmodule PgLargeObjects do
9696
{:ok, buffer} = StringIO.open("", encoding: :latin1)
9797

9898
result =
99-
with :ok <- export(repo, oid, into: IO.binstream(buffer, opts[:bufsize])) do
99+
with :ok <- export(repo, oid, into: IO.binstream(buffer, opts[:bufsize]), bufsize: opts[:bufsize]) do
100100
{_input, output} = StringIO.contents(buffer)
101101
{:ok, output}
102102
end

0 commit comments

Comments
 (0)