Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fDAl6-0007bc-C1 for pgsql-bugs@arkaria.postgresql.org; Mon, 30 Apr 2018 15:30:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fDAl5-0000ps-3P for pgsql-bugs@arkaria.postgresql.org; Mon, 30 Apr 2018 15:30:31 +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.89) (envelope-from ) id 1fDAl4-0000pd-Ti for pgsql-bugs@lists.postgresql.org; Mon, 30 Apr 2018 15:30:30 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fDAl2-0006Qi-BR for pgsql-bugs@lists.postgresql.org; Mon, 30 Apr 2018 15:30:30 +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 w3UFUP7A011814; Mon, 30 Apr 2018 11:30:25 -0400 From: Tom Lane To: adam.bartoszewicz@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15181: pg_dump - missing schema in CREATE TEXT SEARCH DICTIONARY In-reply-to: <152510057034.19803.9209003918751664295@wrigleys.postgresql.org> References: <152510057034.19803.9209003918751664295@wrigleys.postgresql.org> Comments: In-reply-to =?utf-8?q?PG_Bug_reporting_form?= message dated "Mon, 30 Apr 2018 15:02:50 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <11812.1525102225.1@sss.pgh.pa.us> Date: Mon, 30 Apr 2018 11:30:25 -0400 Message-ID: <11813.1525102225@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =?utf-8?q?PG_Bug_reporting_form?= writes: > CREATE TEXT SEARCH DICTIONARY polish_thesaurus ( > TEMPLATE = thesaurus, > DictFile = polish, -- tsearch_data/polish.ths > Dictionary = polish_ispell > ); > The bug ocurs when I try to dump and reload database structure. > pg_dump creates command with missing schema: > CREATE TEXT SEARCH DICTIONARY public.polish_thesaurus ( > TEMPLATE = pg_catalog.thesaurus, > dictfile = 'polish', dictionary = 'polish_ispell' ); Hm. There is not a lot that pg_dump can do about that: it's really a design shortcoming in the thesaurus template, namely that the sub-dictionary is referenced by a string rather than by OID. You could break it equally well with "ALTER TEXT SEARCH DICTIONARY polish_ispell RENAME ...", or for that matter by trying to use polish_thesaurus in any context where you didn't have the public schema in your search path. I'd recommend explicitly specifying "Dictionary = public.polish_ispell" when you create the thesaurus dictionary. I suppose we should adjust the docs to point out this hazard, as well. regards, tom lane