You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
dbWriteTable() writes list columns that are not lists of raw as garbage bytea #648
A list column whose elements are not raw vectors (for example integer or character vectors) is written as a bytea column with meaningless content, without an error or warning. Through Arrow the same happens: a list<int32> column arrives as a list_of<integer> in dbAppendTableArrow() and is written the same way.
Location: RPostgres, get_data_type() maps any list to BYTEA, and sql_data_copy() encodes each element with paste0("\\x", paste(format(x), collapse = "")), which only makes sense for raw vectors. Binding a list parameter errors cleanly ("Lists must contain raw vectors or NULL"), so only the COPY path is affected.
Reprex against the CRAN release (the output on main at 41cd4be is the same):
decide: error for lists that are not lists of raw, or map them to PostgreSQL arrays
fix
test
Severity: high (proposed, Kirill may change). Silent data corruption.
Native Arrow support is coordinated in #631; it is not expected to fix this by construction. The data frame path stays as it is, and the native create has to decide what Arrow list types map to (PostgreSQL arrays, or an error).
Activity
krlmlr commentedon Nov 29, 2026
Closed to keep the issue tracker for issues reported by others; the work here is still open and tracked with the
status: openlabel.Generated by Claude Code