Skip to content
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

Type mismatch "time" #365

Open
TheCHIM opened this issue Aug 11, 2024 · 0 comments
Open

Type mismatch "time" #365

TheCHIM opened this issue Aug 11, 2024 · 0 comments

Comments

@TheCHIM
Copy link

TheCHIM commented Aug 11, 2024

Issue report

When trying to execute select * from ms_table, the error "invalid syntax for type time: "Jan 1 1900 03:27:12.0000000PM"" occurs

Operating system

On recent GNU/Linux distributions, you can provide the content of the file /etc/os-release

Alt Linux 10.3

Version of tds_fdw

tds_fdw 2.0.3
From a psql session, paste the outputs of running \dx

If you built the package from Git sources, also paste the output of running git log --source -n 1 on your git clone from a console

List of installed extensions
     Name     | Version |   Schema   |                                    Description
--------------+---------+------------+-----------------------------------------------------------------------------------
 plpgsql      | 1.0     | pg_catalog | PL/pgSQL procedural language
 postgres_fdw | 1.1     | public     | foreign-data wrapper for remote PostgreSQL servers
 tds_fdw      | 2.0.3   | public     | Foreign data wrapper for querying a TDS database (Sybase or Microsoft SQL Server)
(3 rows)

Version of PostgreSQL

From a psql session, paste the output of running SELECT version();

version
------------------------------------------------------------------------------------------------------------------------------------
 PostgreSQL 16.3 on x86_64-alt-linux-gnu, compiled by x86_64-alt-linux-gcc (GCC) 10.3.1 20210703 (ALT Sisyphus 10.3.1-alt2), 64-bit
(1 row)

Version of FreeTDS

How to get it will depend on your Operating System and how you installes FreeTDS

From a console:

  • On RPM based systems: rpm -qa|grep freetds
  • On Deb based systems: dpkg -l|grep freetds
  • If you built your own binaries from source code, then go to the sources, and run: grep 'AC_INIT' configure.ac
rpm -qa|grep freetds
libdbi-drivers-dbd-freetds-0.9.0-alt6.x86_64
i586-libfreetds-1.4.10-alt2.i586
i586-libfreetds-unixodbc-1.4.10-alt2.i586
libfreetds-unixodbc-1.4.10-alt2.x86_64
i586-libfreetds-devel-1.4.10-alt2.i586
libfreetds-1.4.10-alt2.x86_64
libfreetds-devel-1.4.10-alt2.x86_64

Logs

Please capture the logs when the error you are reporting is happening, as well as commands with their outputs if you are reporting a problem build or installing

For problems using tds_fdw on PostgreSQL how to do it will depend on your system, but if your PostgreSQL is installed on GNU/Linux, you will want to use tail -f with the log of the PostgreSQL cluster

For MSSQL you will need to use the SQL Server Audit Log

Replace this with the commands and outputs

Sentences, data structures, data

This will depend on the exact problem you are having and data privacy restrictions

However the more data you provide, the more likely we will be able to help

As a bare minimum, you should provide

  • The SQL sentence that is failing
  • The data structure on the PostgreSQL side and on the MSSQL side

MSSQL
2024-08-11_11-07-08
Postgresql
2024-08-11_11-06-59

@TheCHIM TheCHIM closed this as completed Aug 11, 2024
@TheCHIM TheCHIM reopened this Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant