PostgreSQL : Refresh a materialized view base on a foreign table
0
votes
1
answer
812
views
I've got a foreign table from a distant csv host on a external webserver.
I need to enhance this table so I create a materialized view to add some extra fields and join with internal data. Making a view not working, I've got a error (probably due to performance issue of distant http server)
I can't use some bash cron script on the Linux host as IT department not wanted so I need to stay in PostgreSQL capabilities it self.
I've try [this method](https://stackoverflow.com/questions/29437650/how-can-i-ensure-that-a-materialized-view-is-always-up-to-date) but it seems I can't add a trigger on a foreign table.
Any way to refresh materialized view ? (each time distant csv is updated but could be also based on a frequency, for example each 24h)
---
EDIT to be more efficient : How to refresh a materialized view from a foreign table ?
Asked by Bad Wolf
(11 rep)
Dec 7, 2021, 01:41 PM
Last activity: Feb 21, 2025, 02:08 AM
Last activity: Feb 21, 2025, 02:08 AM