pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <bruce@momjian.us>
Cc: robrwo@gmail.com
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: crosstab documentation should add a note about use in materialized views
Date: Tue, 22 Nov 2022 16:35:52 -0500
Message-ID: <3558401.1669152952@sss.pgh.pa.us> (raw)
In-Reply-To: <Y30+6uiZANO7iZkW@momjian.us>
References: <166608181322.2042183.16156070469788658076@wrigleys.postgresql.org>
	<Y30+6uiZANO7iZkW@momjian.us>

Bruce Momjian <bruce@momjian.us> writes:
>> When using a crosstab in a materialized view, if the SQL is not qualified
>> with a schema, that restoring a database from a dump may fail. See the
>> discussion in
>> https://www.postgresql.org/message-id/16202-b6b345c9d2819409%40postgresql.org

> I am trying to understand the scope of this breakage.  I think it is
> because crosstab specifies queries as strings, and a materialized view
> has to run the query during restore to populate the materialized view. 
> Is this the only combination of pg_dump restore breakage?

It doesn't sound like this is in any way unique to crosstab.
Any underqualified reference to a user-defined object can cause
problems during dump/restore, because of the restricted search_path
we use during restore.

			regards, tom lane





view thread (3+ messages)

Message-ID: <3558401.1669152952@sss.pgh.pa.us>
Permalink:  ../3558401.1669152952@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3558401.1669152952@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 using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, bruce@momjian.us, robrwo@gmail.com, pgsql-docs@lists.postgresql.org
  Subject: Re: crosstab documentation should add a note about use in materialized views
  In-Reply-To: <3558401.1669152952@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