Open kinghuang opened 1 year ago
To make this work, I think we would need to do a couple things at minimum:
IMPORT FOREIGN SCHEMA
, we need a mapping from SQL Server's geometry
type to a specific PostgreSQL type in the tdsImportSqlServerSchema()
function - https://github.com/tds-fdw/tds_fdw/blob/16f3fc5cf97bc661021b076f5df3be97c151a42b/src/tds_fdw.c#L3226SELECT
, we would also need a conversion from SQL Server's geometry
type to a specific PostgreSQL type in the tdsIterateForeignScan()
function - https://github.com/tds-fdw/tds_fdw/blob/16f3fc5cf97bc661021b076f5df3be97c151a42b/src/tds_fdw.c#L1793Other changes might also be required.
Issue report
I've imported a foreign table that has
geometry
columns. If I execute a select with any geometry columns included, a segmentation fault occurs. Selecting without any geometry columns work as expected.Operating system
Version of tds_fdw
Version of PostgreSQL
Version of FreeTDS
Logs
Sentences, data structures, data
The actual object names have been replaced.
Schema import:
Example query:
Structure in PostgreSQL:
Structure in SQL Server: