Open cstork opened 4 years ago
I had this problem too and found a solution.
The problem is caused by the default date format
in freetds
. The default format uses a ':' between the seconds and milliseconds, but postgresql expects a '.'
Create file /etc/freetds/locales.conf
on the postgresql server to change the date format
used by freetds
:
[default]
date format = %b %e %Y %I:%M:%S.%z%p
i meet the same trouble in win10, how to change ":" to "." in windows? i can not find the freetds.conf or locales.conf
I had very similar problem and solution from https://github.com/tds-fdw/tds_fdw/issues/271#issuecomment-731581415 really helped me. Thanks @Neopallium !
Issue report
When I create a foreign table with
IMPORT FOREIGN SCHEMA
for a table in a SQL Anywhere DB there's a column of typedatetime
on the foreign server which is mapped to a local column of typetimestamp without time zone
.Once I try to read the data (i.e. issue a
SELECT *
statement) I get the following error:Any ideas?
Operating system
Version of tds_fdw
tds_fdw version 2.0.2
From a
psql
session, paste the outputs of running\dx+
Version of PostgreSQL
Version of FreeTDS
dpkg -l|grep freetds