luxms / rw_redis_fdw

Other
0 stars 3 forks source link

fix UPDATE/DELETE operations with function calls #11

Closed petrov9268 closed 8 months ago

petrov9268 commented 8 months ago

https://github.com/luxms/rw_redis_fdw/commit/f94c101f3ca859f0854f9eb163493b0edde5ab90#diff-7f0cc38c5bd36866d7202ea65ca33ceda719949c9822a164b343471a759e56baR3525

Adapted code to newer callback signature (pg14 and above), but broke UPDATE/DELETE operations if there was a function call inside WHERE for tables with renamed columns. For these tables, column key (if renamed) was stored with the real column name, resulting in a key not provided error.

This pull request fixes the above issue, adds renaming of the key column in sql/redis_fdw.sql and UPDATE/DELETE operations with a format(TEXT,TEXT) call. Also adds missing expected output, to compare against.