Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dv945-0005dZ-1E for pgsql-bugs@arkaria.postgresql.org; Thu, 21 Sep 2017 21:31:21 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dv944-0006WX-KK for pgsql-bugs@arkaria.postgresql.org; Thu, 21 Sep 2017 21:31:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dv944-0006Tk-0U for pgsql-bugs@postgresql.org; Thu, 21 Sep 2017 21:31:20 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dv940-0007pX-JB for pgsql-bugs@postgresql.org; Thu, 21 Sep 2017 21:31:18 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id CA2E95F795; Thu, 21 Sep 2017 17:31:15 -0400 (EDT) Date: Thu, 21 Sep 2017 17:31:15 -0400 From: Stephen Frost To: "Ian R. Campbell" Cc: pgsql-bugs@postgresql.org Subject: Re: pg_dump does not fully include the schema, causing runtime errors Message-ID: <20170921213115.GM4628@tamriel.snowman.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="QgAPEkIus8n+eZZF" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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 --QgAPEkIus8n+eZZF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings Ian, * Ian R. Campbell (ian.campbell@thepathcentral.com) wrote: > pg_dump uses SET search_path in order to simplify schema references. Below > is a snippet of a CREATE TABLE definition that references a function in t= he > 'internal' schema: >=20 > ... stock_balances integer[] DEFAULT stock_balances_snapshot() ... >=20 > This will restore OK, but it will not execute unless the caller also sets > the search_path, which is certainly not a given or even to be expected. I'm not really understanding what this sentence means. Yes, it'll restore OK, and the result should work just fine. What do you mean by "will not execute unless the caller also sets the search_path" ... ? > I have also observed the following output, which suffers the same issue: >=20 > ... role "internal".user_role NOT NULL DEFAULT > 'guest'::user_role ... What is the issue you're referring to? > Can pg_dump have an option to output fully qualified schema? You've not shown why such an option is needed, so it's pretty hard to see why it would make sense to add it. Thanks! Stephen --QgAPEkIus8n+eZZF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJZxC+jAAoJEO1sijiDR2RVPgsP/3RtNHuFUoqR2jAqQNWoDBeM CED+K339HbJCajCT/0h+pIUPnsZstDBJgOKRkOwTrKA9OgOzyMSM99e2rOeHwJCi 97yheXiTB0ccDxLDTYTCTtKpAJ4B4GP3Ilt6yn21zeimwJfJmcQ3D6lYhJyleGmB Z+4bkcSrGWU/bMt2+sgC9ONuFvi3vJOBhOIHO70e1pI6kcaJ7p/OFyog11TGQWxk aO8mPUnayC18lMD2qMtk2oaytFQeaqii4za4I8+qst2y8CihGd4/dHEEJSrlpxjy uiS0CZITtxrD3NIbMsk76Fkvg8ISzFMOrncy4wTCuBR96w8GA6fJSJXrsJEQJz0x fl+nB9bLPhpasyTn6N1r0AcTd24ySmBq0pOBBmBXIPKG4JTGnVhtUWYOebLTxEbF X9xla9Dke4n+HbAEVwrd3BPck+7eGTHObQycpJZ0u4JzXD4pWWdvqMlejdTI+dHr wvjuuzOXmEk37oTwKST+yhDhOZUm6+uwZlNEbSox0FB+9BTo2CUk5nlkWQDm5OAz TySqtkXum5flJNTs28YWGLviQ+7m0RfEu99YHAo/ZUksuc9/1VaY1U9FVpjJ8Ldq dHhRixIh2VrpXwTbsx9l2C/1wgUIxmJssjHOJ8JJ6pFKfcImYDEuTNoIl5GPSN+S rxVxOR9qb6yp8zDB3TZF =yOqf -----END PGP SIGNATURE----- --QgAPEkIus8n+eZZF--