Re: FDW for PostgreSQL - Mailing list pgsql-hackers

From Tom Lane
Subject Re: FDW for PostgreSQL
Date
Msg-id 25883.1361460094@sss.pgh.pa.us
Whole thread Raw
In response to Re: FDW for PostgreSQL  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: FDW for PostgreSQL  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
> On 2013-02-21 09:58:57 -0500, Tom Lane wrote:
>> How exactly would it do that via an FDW?  Surely if the user tries to
>> execute INSERT/UPDATE/DELETE against a foreign table, the command would
>> get rejected in a read-only transaction, long before we even figure out
>> that the target is a foreign table?

> I was thinking of querying a remote table thats actually a view. Which
> might be using a function that does caching into a table or something.
> Not a completely unreasonable design.

Yeah, referencing a remote view is something that should work fine, but
it's not clear to me why it should work differently than it does on the
remote server.  If you select from that same view in a READ ONLY
transaction on the remote, won't it fail?  If so, why should that work
if it's selected from via a foreign table?
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Materialized views WIP patch
Next
From: Kevin Grittner
Date:
Subject: Re: Materialized views WIP patch