Skip to content

Commit 8a04e90

Browse files
committed
fix: return FINISHED when COPY stream ends in Read()
1 parent a741313 commit 8a04e90

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/postgres_binary_reader.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,10 @@ PostgresReadResult PostgresBinaryReader::Read(DataChunk &output) {
2727
}
2828
FreeBuffer();
2929
if (!FetchNextBuffer()) {
30-
break;
30+
return PostgresReadResult::FINISHED;
3131
}
3232
}
33-
if (output.size() > 0) {
34-
return PostgresReadResult::HAVE_MORE_TUPLES;
35-
}
36-
return PostgresReadResult::FINISHED;
33+
return PostgresReadResult::HAVE_MORE_TUPLES;
3734
}
3835

3936
bool PostgresBinaryReader::FetchNextBuffer() {

0 commit comments

Comments
 (0)