tds-fdw / tds_fdw

A PostgreSQL foreign data wrapper to connect to TDS databases (Sybase and Microsoft SQL Server)
Other
377 stars 101 forks source link

datetime2 not working properly #329

Open cooltnt opened 1 year ago

cooltnt commented 1 year ago

sql server ddl:

CREATE TABLE [dbo].[test_datetime2]( [dt] datetime2 NULL )

SELECT * FROM [dbo].[test_datetime2]

dt 2022-12-05 16:56:49.1812318 2022-12-05 16:57:12.6690343 2022-12-05 16:57:15.5914425 2022-12-05 16:57:16.4969742 2022-12-05 16:57:17.0174549

postgresql ddl:

CREATE foreign TABLE public.test_datetime2 ( dt timestamptz ) SERVER mssql_local OPTIONS (schema_name 'dbo', table_name 'test_datetime2');

select * from public.test_datetime2 ;

ERROR: invalid input syntax for type timestamp with time zone: "Dec 5 2022 04:56:49:1812318PM"