-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
datetimeoffset type : invalid input syntax for type timestamp with time zone #480
Comments
Hi, sorry for late reply. The library is using DB-library. From what I understand (I would need some debug output to make it sure) PG/tds_fdw is doing a select on MSSQL and converting DATETIMEOFFSET into string then trying to convert it back to PG TIMESTAMP. Simply PG is not accepting the string MSSQL/DB-library is using. You can probably change that format using Otherwise you can try a connector using ODBC instead of DB-library. |
thank you so much @fziglio for your answer this is exactly our analysis of what is happening as well here's what our
|
The question is also "how pg/tds_fdw expect dates to be formatted?" |
I think some people have the same issue indeed |
I think this might be the solution |
I would try also something like |
Hello! First of all, thank you very much for the effort put into this open source project.
I am using https://github.com/tds-fdw/tds_fdw to query SQL Server tables in PostgreSQL. freetds is used as a backend in that context.
When querying tables with a datetimeoffset data type, I'm having an error, which I think is due to the string-conversion of
datetimeoffset
objects:The
MyTable
table is exposed as a Foreign Table like so:In the SQL Server database, the table has the following structure
With the following user-defined data types:
Is the
datetimeoffset
data type correctly supported by freetds?Is there anything that can be done to make the conversion of the data to correct PostgreSQL timezone-aware datetimes?
Thanks!
The text was updated successfully, but these errors were encountered: