Dynamic paths for postgres file_fdw (csv)
My question: Is there a way to point the base of the file path to a non-static value to abstract that change? Or would I be better off writing a script to collect the list of foreign tables, drop them, and rebuild the DDL with new filepath arguments?


You can point to a symlink. However, I wouldn't. I would keep things running just the way you're doing it now. What's the reason to do that? I imagine under any reasonable load the DDL is not an issue. But, it may be worth experimenting and reporting back.