mirror of
https://github.com/dimitri/pgloader.git
synced 2026-01-29 02:51:53 +01:00
The query for concurrency-support didn't get the memo that we should ignore PostgreSQL identifier-case when querying the source MySQL database. Fix the query string to include column names as given by the MySQL catalogs. In bug report #703, the problem is found in PostgreSQL queries. This has been fixed before already. Trying to reproduce the bug produced an error in the concurrency-support query instead, so let's fix this one. Fix #703.
27 lines
752 B
Fish
27 lines
752 B
Fish
load database
|
|
-- from mysql://root@localhost/pgloader
|
|
from mysql://root@unix:/tmp/mysql.sock:3306/pgloader
|
|
into postgresql:///pgloader
|
|
|
|
WITH concurrency = 2,
|
|
multiple readers per thread,
|
|
rows per range = 50000,
|
|
quote identifiers
|
|
|
|
ALTER SCHEMA 'pgloader' RENAME TO 'mysql'
|
|
|
|
CAST column utilisateurs__Yvelines2013-06-28.sexe
|
|
to text drop not null using empty-string-to-null,
|
|
|
|
column base64.id to uuid drop typemod,
|
|
column base64.data to jsonb using base64-decode,
|
|
|
|
type decimal
|
|
when (and (= 18 precision) (= 6 scale))
|
|
to "double precision" drop typemod,
|
|
|
|
type smallint when unsigned to int drop typemod
|
|
|
|
BEFORE LOAD DO $$ create schema if not exists mysql; $$;
|
|
|