Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9F4l-0002C7-Vw for pgsql-bugs@arkaria.postgresql.org; Fri, 12 May 2017 18:14:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d9F4l-0007OW-Ii for pgsql-bugs@arkaria.postgresql.org; Fri, 12 May 2017 18:14:03 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d9F4k-0007Ll-Si for pgsql-bugs@postgresql.org; Fri, 12 May 2017 18:14:03 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d9F4i-00010S-Co for pgsql-bugs@postgresql.org; Fri, 12 May 2017 18:14:01 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v4CIDs9j026980; Fri, 12 May 2017 14:13:54 -0400 From: Tom Lane To: jeremy@cowgar.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #14649: Function Namespace Resolution Bug In-reply-to: <20170512174059.1791.21888@wrigleys.postgresql.org> References: <20170512174059.1791.21888@wrigleys.postgresql.org> Comments: In-reply-to jeremy@cowgar.com message dated "Fri, 12 May 2017 17:40:59 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <26978.1494612834.1@sss.pgh.pa.us> Date: Fri, 12 May 2017 14:13:54 -0400 Message-ID: <26979.1494612834@sss.pgh.pa.us> 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 jeremy@cowgar.com writes: > In short, when a CHECK on a column in a different schema references a > function in public that references another function in public implicitly, > there is confusion. The workaround is to prefix the function calls with the > schema. I don't see any PG bug here. If you don't schema-qualify the function reference, then it is dependent on the current search_path, and pg_dump/ pg_restore have their own ideas about how to set search_path. Even if those two somehow magically intuited what search_path you're expecting, this coding would still be fragile since some other user might use a different search_path than you while accessing the table. The schema qualification isn't a "workaround", it's just good coding practice. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs