Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YVUqi-00089L-IA for pgsql-bugs@arkaria.postgresql.org; Wed, 11 Mar 2015 00:50:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YVUqh-0007h6-Og for pgsql-bugs@arkaria.postgresql.org; Wed, 11 Mar 2015 00:50:11 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YVUqf-0007gH-Mz for pgsql-bugs@postgresql.org; Wed, 11 Mar 2015 00:50:09 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1YVUqX-0002SO-G8 for pgsql-bugs@postgresql.org; Wed, 11 Mar 2015 00:50:07 +0000 Received: from localhost ([127.0.0.1]:63885 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtp (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YVUqS-0001tj-Ii; Wed, 11 Mar 2015 00:49:56 +0000 From: Andrew Gierth To: Tom Lane Cc: Elijah Zupancic , pgsql-bugs@postgresql.org Subject: Re: pg_dump search path issue In-Reply-To: <18195.1423099931@sss.pgh.pa.us> (Tom Lane's message of "Wed, 04 Feb 2015 20:32:11 -0500") Message-ID: <871tkwtld3.fsf@news-spur.riddles.org.uk> References: <18195.1423099931@sss.pgh.pa.us> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) Date: Wed, 11 Mar 2015 00:49:56 +0000 MIME-Version: 1.0 Content-Type: text/plain X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org >>>>> "Tom" == Tom Lane writes: > Elijah Zupancic writes: >> In the SQL dump, you will notice that the SET search_path = xxx >> values will often not include the public schema which holds the >> functions needed to properly recreate tables that depend on >> extensions. Tom> All the cases I've seen of this involve user-defined functions Tom> that are broken, often dangerously so. Just found (via a report on irc) a case that doesn't involve functions: create extension hstore; create schema foo create table t1 (a hstore, b integer) create table t2 (a hstore, c integer) create view v1 as select * from t1 join t2 using (a); dump/restore gives: ERROR: operator does not exist: public.hstore = public.hstore HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. STATEMENT: CREATE VIEW v1 AS SELECT t1.a, t1.b, t2.c FROM (t1 JOIN t2 USING (a)); (the reporting user was actually using ip4r's ip4 type, which makes more sense as a join column than hstore does, but the idea is the same) -- Andrew (irc:RhodiumToad) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs