Create or replace table stmt from PostGres to SQL converts Date into DateTime2

I understand now. Since the data is converted from PostgreSQL to .NET (the internal code engine Invantive SQL is written in), and then from .NET to SQL Server, there is one more component involved, and that gives the trouble here.

Historically, .NET did not have a Date or Time data type. Since .NET 6, which was released a few months ago, it does have such data types (DateOnly and TimeOnly). These are not (yet) implemented in Invantive SQL, so the only conversion we can make now is to a data type that supports both date and time. That’s why it is not possible to convert a PostgreSQL date to a SQL Server date.

The mapping from PostgreSQL Date to SQL Server DateTime2 is therefor intended behavior.

In case it causes any errors, please add a reply.