Load with explicit column lists -- positional COPY corrupts silently

OtherKlusterServices
Shipped
10 Agosti 2026, 01:10 UTC
Author
Kamo
Commit
8f40cb9

COPY t FROM STDIN with no column list maps CSV fields to the table's PHYSICAL column order. The CSVs come from COPY (SELECT *) on CockroachDB, and Hibernate creates the YugabyteDB tables in a different order entirely -- esign_templates starts **************** on one side and **************** on the other. That surfaced as "invalid input syntax for type uuid" on 207 tables. Those are the LUCKY failures: two same-typed columns swapped would have loaded clean and silently wrong. Two further traps found while fixing it: - Emitting quote_ident() through `cockroach sql --format=tsv` makes the formatter CSV-escape the entire aggregate ("a,""role"",b"), which psql then reads as ONE 63-character identifier. The columns file now stores plain names and load.sh applies the quoting. - CockroachDB has 6 hidden columns (NOT VISIBLE rowid). SELECT * omits them, so the CSVs lack them, but information_schema lists them -- the column list has to exclude them or COPY reports "missing data for column rowid". Verified on the three previously-failing tables: 62, 69 and 2 rows, each exactly matching the baseline.

All changes

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei