0

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 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 Dec 7, 2021 at 13:41
1

1 Answer 1

1

As trigger cannot be set on Foreign Table, I've find an other way by using Pg_Cron extension

answered Dec 8, 2021 at 10:07

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.