Skip to content

Commit

Permalink
Use AddStringOrBlob to create to duckdb string from blob value (#521)
Browse files Browse the repository at this point in the history
To construct output string use`AddStringOrBlob` which doesn't require
that input is valid UTF8.
  • Loading branch information
mkaruza authored Jan 8, 2025
1 parent 0add577 commit 6a01150
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pgduckdb_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,7 @@ ConvertPostgresToDuckValue(Oid attr_type, Datum value, duckdb::Vector &result, i
size_t bytea_length = VARSIZE_ANY_EXHDR(value);
const duckdb::string_t s(bytea_data, bytea_length);
auto data = duckdb::FlatVector::GetData<duckdb::string_t>(result);
data[offset] = duckdb::StringVector::AddString(result, s);
data[offset] = duckdb::StringVector::AddStringOrBlob(result, s);
break;
}
case duckdb::LogicalTypeId::LIST: {
Expand Down

0 comments on commit 6a01150

Please sign in to comment.