dimitri / pgloader

Migrate to PostgreSQL in a single command!
http://pgloader.io
Other
5.45k stars 548 forks source link

Casting errors when using Redshift as a data source #1549

Open ChrisKonishi opened 11 months ago

ChrisKonishi commented 11 months ago
pgloader version "3.6.7~devel"
compiled with SBCL 2.1.11.debian

No


I've been trying to migrate from Redshift to Postgres with a simple command

load database
    from uri
    into uri
including only table names matching 'table' in schema 'schema'
with
    data only
;

(The table is already created)

But I get the following error message:

Database error 42846: cannot cast type boolean to character varying

followed by a query. I won't show the query, but it is something like this

SELECT boolean_column::text ...

which causes the error

ruaridhnewman commented 1 month ago

Did you ever solve this? Having the same issue

whsmacon commented 3 weeks ago

I'm having the same issue - pgloader appears to be querying everything as a ::text Redshift boolean will not convert to text ... not sure what the fix is here