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
I have a mssql db using timestampz with a default of getdate() which I think translates to getutctime(). The default casting rules preserves this default but it is not compatible with postgres. I can't find any way to override the casting rules like what is possible with mysql.
I'm using this command file
load database
from mssql://SA:{{SA_PASSWORD}}@mssql-db/mobilerecellcom
into postgresql://postgres:postgres@db/postgres
cast type timestamptz to timestamptz drop default
before load do $$ CREATE EXTENSION IF NOT EXISTS "uuid-ossp" $$
including only table names like 'MR_Requests', 'MR_Organization' in schema 'dbo'
alter schema 'dbo' rename to 'public'
;
which produces this output
2021-12-07T15:27:50.265000Z ERROR Database error 22007: invalid input syntax for type timestamp with time zone: "getutcdate()"
It doesn't seem like the cast rule has any affect here.
The text was updated successfully, but these errors were encountered:
Unfortunently not. We ended up writing migration scripts by hand to move data between our dbs. The schemas and data translations were just too different for pgloader to deal with.
pgloader --version
did you search for other similar issues?
I have a mssql db using timestampz with a default of
getdate()
which I think translates togetutctime()
. The default casting rules preserves this default but it is not compatible with postgres. I can't find any way to override the casting rules like what is possible with mysql.I'm using this command file
which produces this output
2021-12-07T15:27:50.265000Z ERROR Database error 22007: invalid input syntax for type timestamp with time zone: "getutcdate()"
It doesn't seem like the cast rule has any affect here.
The text was updated successfully, but these errors were encountered: