My problem: I need to define foreign table dynamically and set different where conditions every time. I am doing this in function, but I am getting error which doesn\'t make