babelfish-for-postgresql / babelfish_extensions

Babelfish for PostgreSQL provides the capability for PostgreSQL to work with applications written for Microsoft SQL Server. Babelfish understands the SQL Server wire-protocol and T-SQL, the Microsoft SQL Server query and procedural language, so you don’t have to switch database drivers or rewrite all of your application queries.
https://babelfishpg.org/
Apache License 2.0
277 stars 93 forks source link

[Bug]: function col_length(unknown, unknown) does not exist, when use tsql client. #1447

Open giorgiobazzo opened 1 year ago

giorgiobazzo commented 1 year ago

What happened?

I'm testing the compatibility of scripts for creating MS SQL Server databases. I could see that the col_length function is not being recognized by Babelfish.

COL_LENGTH (Transact-SQL)

To reproduce the error I'm getting:

$ tsql -H localhost -U babelfish_user -p 1433  -P 12345678 -D master
1> SELECT COL_LENGTH('mytable','mycolumn')
2> GO
...
Msg 33557097 (severity 16, state 1) from BABELFISH Line 1:
        "function col_length(unknown, unknown) does not exist"

Version

BABEL_3_X_DEV (Default)

Extension

None

Which flavor of Linux are you using when you see the bug?

No response

Relevant log output

No response

Code of Conduct

robverschoor commented 1 year ago

Indeed, COL_LENGTH() is not currently supported by Babelfish. The Babelfish Compass tool would also tell you that if you ran your SQL code through it. This is unrelated to the client being used.