tds_fdw icon indicating copy to clipboard operation
tds_fdw copied to clipboard

Unicode conversion issue resulting in replacement error characters for NBSP in result set

Open jrgilman opened this issue 4 months ago • 0 comments

Issue report

We're running into an issue where the NBSP character on our MSSQL server is being turned into the Replacement Character Unicode Error / Missing Character symbol (0xFFFD). At the moment this is causing issues for us when trying to do joins, but it seems to also cause syntax errors. Not sure about the best way forward here since we're pretty limited on what we can modify on our system since we're on RDS.

Operating system

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

Amazon RDS - Unknown?

Version of tds_fdw

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

Version 2.0.2

Version of PostgreSQL

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

PostgreSQL 13.12 on aarch64-unknown-linux-gnu, compiled by aarch64-unknown-linux-gnu-gcc (GCC) 9.5.0, 64-bit

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
Unknown

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

N/A, Result Set has error in it

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
SELECT * FROM dbo.bad_table;

jrgilman avatar Oct 14 '24 18:10 jrgilman