dimitri / pgloader

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

Add mapping of getutcdate ms sql default function #1466

Open bjrne opened 1 year ago

bjrne commented 1 year ago

getdate() is getutcdate() under the hood, but getutcdate() can also be used and thus also needs a mapping/translation

Thanks for this awesome open source software!

axtox commented 9 months ago

Hey, any news on that? I have this issue - our database uses getutcdate() all over the place so it's good to have this fix in latest release, because it's easier to use pgloader with docker

I'm new to pgloader, reading through documentation currently, hope I could at least use loader script to address this issue, but this feature is good to have.

And I believe that default getdate() should be translated to LOCALTIMESTAMP

Also adding missing SYSUTCDATETIME and SYSDATETIME might be a good point, they return datetime2 format which range is still included in PostgreSQL timestamp with time zone type so basically can be safely translated to the same CURRENT_TIMESTAMP and LOCALTIMESTAMP