pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Henrik Uggla <Henrik.Uggla@kristianstad.se>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: SV: Refreshing materialized views
Date: Tue, 28 Nov 2017 10:18:35 -0500
Message-ID: <23154.1511882315@sss.pgh.pa.us> (raw)
In-Reply-To: <dbc16879aa424296bb1c4950c732cb57@kristianstad.se>
References: <9240031180ff4c419251652f39908dd0@kristianstad.se>
	<13279.1511879147@sss.pgh.pa.us>
	<dbc16879aa424296bb1c4950c732cb57@kristianstad.se>

Henrik Uggla <Henrik.Uggla@kristianstad.se> writes:
> The underlying tables are foreign tables. The user has been mapped to a foreign user with select permission. I have no problem selecting from the foreign tables or the materialized views.

[ shrug... ] WFM; if I can select from the foreign table then I can make
a materialized view that selects from it, and that refreshes without
complaint.  Admittedly, getting things set up to select from the foreign
table is trickier than it sounds: your local user needs SELECT on the
foreign table plus a mapping to some remote userid, and *on the remote
server* that remote userid needs SELECT on whatever the foreign table
is referencing.  I'm guessing you messed up one of these components.

			regards, tom lane




view thread (4+ messages)  latest in thread

Message-ID: <23154.1511882315@sss.pgh.pa.us>
Permalink:  ../23154.1511882315@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/23154.1511882315@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, Henrik.Uggla@kristianstad.se
  Subject: Re: Refreshing materialized views
  In-Reply-To: <23154.1511882315@sss.pgh.pa.us>
  References: <9240031180ff4c419251652f39908dd0@kristianstad.se> <13279.1511879147@sss.pgh.pa.us> <dbc16879aa424296bb1c4950c732cb57@kristianstad.se> <23154.1511882315@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox