There are lots of user-defined data types in my Sybase AES 15.5 database.
They are based on all possible standard types, e.g. integer, float, varchar, etc.
When importing a foreign schema, tds_fdw always falls back to text for fields declared with user-defined types.
As a result, you can't apply filters to the query, because of type conversion errors, e.g.:
=> select id from some_table limit 1;
-------------
| id (text) |
-------------
| 1 |
-------------
(1 Row)
=> select * from some_table where id = 1;
ERROR: operator does not exist: text = integer
Hint: No operator matches the given name and argument types. You might need to add explicit type casts.
=> select * from some_table where id = '1';
General SQL Server Error: Implicit conversion from datatype 'VARCHAR' to 'INT' is not allowed.
Use the CONVERT function to run this query.
Description
There are lots of user-defined data types in my Sybase AES 15.5 database. They are based on all possible standard types, e.g. integer, float, varchar, etc.
When importing a foreign schema,
tds_fdw
always falls back totext
for fields declared with user-defined types. As a result, you can't apply filters to the query, because of type conversion errors, e.g.:The original data type for the field in Sybase:
Version of tds_fdw