pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Christopher Causer <chy.causer@gmail.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: pg_dump's restore gives "operator does not exist: public.iprange = public.iprange" but copy paste works
Date: Thu, 08 Jul 2021 16:29:49 -0400
Message-ID: <2041981.1625776189@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwa-2kBY_RnvLXE+XqdmuPtadN-B5XEmT7fdbw9_9+BfHA@mail.gmail.com>
References: <8a602a2a-e0b8-42ef-8468-21fa2eb25bd9@www.fastmail.com>
	<2040892.1625774942@sss.pgh.pa.us>
	<CAKFQuwa-2kBY_RnvLXE+XqdmuPtadN-B5XEmT7fdbw9_9+BfHA@mail.gmail.com>

"David G. Johnston" <david.g.johnston@gmail.com> writes:
> IIUC, functions can force a search_path even during dump/restore by being
> created with one specified as part of the create function command.  Since
> the issue is with stored objects moreso than queries generically is it
> feasible to approach the view solution by adding a "SET" clause to CREATE
> VIEW as well?

Don't see the point.  The issue here is what search_path applies at
view definition time, and you have syntax to control that today:

	SET search_path = whatever;
	CREATE VIEW ... ;
	RESET search_path;

So the problem is not lack of a server feature, it's persuading pg_dump
to emit something other than what it does now.

			regards, tom lane





view thread (9+ messages)  latest in thread

Message-ID: <2041981.1625776189@sss.pgh.pa.us>
Permalink:  ../2041981.1625776189@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2041981.1625776189@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, david.g.johnston@gmail.com, chy.causer@gmail.com
  Subject: Re: pg_dump's restore gives "operator does not exist: public.iprange = public.iprange" but copy paste works
  In-Reply-To: <2041981.1625776189@sss.pgh.pa.us>
  References: <8a602a2a-e0b8-42ef-8468-21fa2eb25bd9@www.fastmail.com> <2040892.1625774942@sss.pgh.pa.us> <CAKFQuwa-2kBY_RnvLXE+XqdmuPtadN-B5XEmT7fdbw9_9+BfHA@mail.gmail.com> <2041981.1625776189@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