Foreign Tables - Mailing list pgsql-general

From Eliot Gable
Subject Foreign Tables
Date
Msg-id CAD-6L_XFF4au6g-adH79VvDFUXuHzSoverjXGkYRmmU6i=P1qg@mail.gmail.com
Whole thread Raw
Responses Re: Foreign Tables  (Guillaume Lelarge <guillaume@lelarge.info>)
Re: Foreign Tables  (Shigeru Hanada <shigeru.hanada@gmail.com>)
List pgsql-general

I am working on a reporting project where I need to generate a report based on data from several different network appliances. Each appliance runs a PostgreSQL database which houses all of the information for the appliance. Further, there are dozens of triggers in the database which fire when various tables are touched in various different ways (insert, update, delete). These triggers currently are used to build materialized views of much of the data that I want to summarize in the reports. 

I have read as much as I can find on 9.1's foreign table support, and it looks almost ideal for bridging the gap between all the databases and collecting all the data into a single report. However, I am unclear on a few points...

1a) Can the foreign tables be written to? For example, I have server1 with table foo and server2 which does 'create foreign table bar' where bar references server1.foo. Can server2 write to bar and have it show in server1.foo?

1b) If it does show in server1.foo, I assume it would also fire any triggers on server1.foo; correct?

2) Given the example in question #1, can I put a trigger on server2.bar and have it actually fire when server1.foo has an insert, update, or delete operation on it?

Thanks in advance for any answers.


--
Eliot Gable

"We do not inherit the Earth from our ancestors: we borrow it from our children." ~David Brower

"I decided the words were too conservative for me. We're not borrowing from our children, we're stealing from them--and it's not even considered to be a crime." ~David Brower

"Esse oportet ut vivas, non vivere ut edas." (Thou shouldst eat to live; not live to eat.) ~Marcus Tullius Cicero

pgsql-general by date:

Previous
From: Andreas Kretschmer
Date:
Subject: Re: How could I find the last modified procedure in the database?
Next
From: Adam Cornett
Date:
Subject: Re: all non-PK columns from information schema