You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(I checked issues #325 and #323 but my issue looks like something different. Maybe this is even feature be design but I decided to record it anyway.)
I have encounter a problem with FDW tables when Sybase source tables use custom defined data types and I try to recreate them in PostgreSQL using domains.
Sybase types are for example
TypCounter number(10,0)
TypPassword univarchar(60)
TDS_FDW casts all these cases as simple TEXT, which of course in many cases does not fit.
Therefore I tried to recreate them as they are as PostgreSQL domains because that was the original request for the migration.
So these data types have exactly the same name and also corresponding underlying data types on both Sybase and PostgreSQL:
number -> number, univarchar -> character varying
I know that number(10,0) is strange on PostgreSQL and should be rather integer/ bigint but original request was to try to use user defined data types.
But if I alter types of FDW columns, these columns are marked as deleted and disappear from FDW table. Here is how it looks like in pg_attributes for the FDW table:
At the end we decided to abandon user defined data types and rather make custom substitution. But in some other use cases this could be actually a must have. So I rather report it.
2.0.3 with patch for float(0) data types from master branch
Name | Version | Schema | Description
---------+---------+--------+-----------------------------------------------------------------------------------
tds_fdw | 2.0.3 | public | Foreign data wrapper for querying a TDS database (Sybase or Microsoft SQL Server)
Version of PostgreSQL
PostgreSQL 15.4 (Ubuntu 15.4-2.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0, 64-bit
Version of FreeTDS
root@cf3996ed5ded:/# dpkg -l|grep freetds
ii freetds-bin 1.1.6-1.1 amd64 FreeTDS command-line utilities
ii freetds-common 1.1.6-1.1 all configuration files for FreeTDS SQL client libraries
ii freetds-dev 1.1.6-1.1 amd64 MS SQL and Sybase client library (static libs and headers)
Logs
I did not find anything in logs related to this problem
Sentences, data structures, data
see above
The text was updated successfully, but these errors were encountered:
Issue report
(I checked issues #325 and #323 but my issue looks like something different. Maybe this is even feature be design but I decided to record it anyway.)
I have encounter a problem with FDW tables when Sybase source tables use custom defined data types and I try to recreate them in PostgreSQL using domains.
Sybase types are for example
TypCounter number(10,0)
TypPassword univarchar(60)
TDS_FDW casts all these cases as simple TEXT, which of course in many cases does not fit.
Therefore I tried to recreate them as they are as PostgreSQL domains because that was the original request for the migration.
So these data types have exactly the same name and also corresponding underlying data types on both Sybase and PostgreSQL:
number -> number, univarchar -> character varying
I know that number(10,0) is strange on PostgreSQL and should be rather integer/ bigint but original request was to try to use user defined data types.
But if I alter types of FDW columns, these columns are marked as deleted and disappear from FDW table. Here is how it looks like in pg_attributes for the FDW table:
And this is how it should look like:
At the end we decided to abandon user defined data types and rather make custom substitution. But in some other use cases this could be actually a must have. So I rather report it.
Thank you very much.
Operating system
Version of tds_fdw
2.0.3 with patch for float(0) data types from master branch
Version of PostgreSQL
Version of FreeTDS
Logs
I did not find anything in logs related to this problem
Sentences, data structures, data
see above
The text was updated successfully, but these errors were encountered: