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'm using tds_fdw in windows 7 x64, I think I have an issue with this function inside tds_err_handler
ereport(ERROR,
(errcode(ERRCODE_FDW_UNABLE_TO_CREATE_EXECUTION),
errmsg("DB-Library error: DB #: %i, DB Msg: %s, OS #: %i, OS Msg: %s, Level: %i",
dberr, dberrstr, oserr, oserrstr, severity)
));
I did a little debug and the function _dblib_handle_info_message located in dbutil.c calls this tds_err_handler function and puts NULL in the oserrstr variable. If I do something that can call this function, like calling a foreign table that doesn't exists (in sql server side) the postgres service crashes.
I modified the function like this:
ereport(ERROR,
(errcode(ERRCODE_FDW_UNABLE_TO_CREATE_EXECUTION),
errmsg("DB-Library error: DB #: %i, DB Msg: %s, OS #: %i, Level: %i",
dberr, dberrstr, oserr, severity)
));
So I don't include the oserrstr variable and postgres just throws the error but the service is safe. I'm not sure how can this null value can cause the service crash, do you have any suggestions?
The text was updated successfully, but these errors were encountered:
I'm using tds_fdw in windows 7 x64, I think I have an issue with this function inside tds_err_handler
I did a little debug and the function _dblib_handle_info_message located in dbutil.c calls this tds_err_handler function and puts NULL in the oserrstr variable. If I do something that can call this function, like calling a foreign table that doesn't exists (in sql server side) the postgres service crashes.
I modified the function like this:
So I don't include the oserrstr variable and postgres just throws the error but the service is safe. I'm not sure how can this null value can cause the service crash, do you have any suggestions?
The text was updated successfully, but these errors were encountered: