slingdata-io / sling-cli

Sling is a CLI tool that extracts data from a source storage/database and loads it in a target storage/database.
https://docs.slingdata.io
GNU General Public License v3.0
398 stars 27 forks source link

Update types_general_to_native.tsv #245

Closed tired-engineer closed 5 months ago

tired-engineer commented 5 months ago

Fix Postgres binary type mapping.

Currently an attempt to replicate one PG database to another fails when binary fields exist:

2024-04-03 19:46:52 INF execution failed

fatal:
~ execution failed
--- task_run.go:99 func1 ---
~ Could not WriteToDb
--- task_run.go:522 runDbToDb ---
~ could not create temp table "public"."*_tmp"
--- task_run_write.go:218 WriteToDb ---
~ Error creating table "public"."*_tmp"
--- task_func.go:74 createTableIfNotExists ---
~ Could not execute SQL
--- database.go:1091 ExecMulti ---

--- task_run.go:99 func1 ---
--- task_run.go:522 runDbToDb ---
--- task_run_write.go:218 WriteToDb ---
--- task_func.go:74 createTableIfNotExists ---
--- database.go:1089 ExecMulti ---
~ Error executing query
--- database.go:1128 ExecMultiContext ---
~ Error executing [tx: false] create table if not exists "public"."*_tmp" ("id" bigint,
"issuer_ca_id" integer,
"certificate" bytes)
--- database.go:1115 ExecContext ---
pq: type "bytes" does not exist