Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g0VRa-0001QI-88 for pgsql-bugs@arkaria.postgresql.org; Thu, 13 Sep 2018 17:30:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g0VRW-0004QH-Bt for pgsql-bugs@arkaria.postgresql.org; Thu, 13 Sep 2018 17:30:14 +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.89) (envelope-from ) id 1g0VRV-0004Py-Th for pgsql-bugs@lists.postgresql.org; Thu, 13 Sep 2018 17:30:14 +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.89) (envelope-from ) id 1g0VRP-0000E4-5P for pgsql-bugs@lists.postgresql.org; Thu, 13 Sep 2018 17:30:12 +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 w8DHU4VX011551; Thu, 13 Sep 2018 13:30:04 -0400 From: Tom Lane To: mr.kovalchuk.andrey@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15382: Error create dictionary in pg_dump In-reply-to: <153681016068.22333.14472119446449542505@wrigleys.postgresql.org> References: <153681016068.22333.14472119446449542505@wrigleys.postgresql.org> Comments: In-reply-to =?utf-8?q?PG_Bug_reporting_form?= message dated "Thu, 13 Sep 2018 03:42:40 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <11549.1536859804.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 13 Sep 2018 13:30:04 -0400 Message-ID: <11550.1536859804@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =3D?utf-8?q?PG_Bug_reporting_form?=3D writes: > Dump is creates, but have one trouble. Result of using pg_resote command= : > pg_restore: [=D0=B0=D1=80=D1=85=D0=B8=D0=B2=D0=B0=D1=82=D0=BE=D1=80 (=D0= =91=D0=94)] could not execute query: =D0=9E=D0=A8=D0=98=D0=91=D0=9A=D0=90 = (Error): = > =D1=81=D0=BB=D0=BE=D0=B2=D0=B0=D1=80=D1=8C =D1=82=D0=B5=D0=BA=D1=81=D1=82= =D0=BE=D0=B2=D0=BE=D0=B3=D0=BE =D0=BF=D0=BE=D0=B8=D1=81=D0=BA=D0=B0 (text = search dictionary) "ispell_apteka25" =D0=BD=D0=B5 > =D1=81=D1=83=D1=89=D0=B5=D1=81=D1=82=D0=B2=D1=83=D0=B5=D1=82 (not exists= ) > =D0=92=D1=8B=D0=BF=D0=BE=D0=BB=D0=BD=D1=8F=D0=BB=D0=B0=D1=81=D1=8C =D0= =BA=D0=BE=D0=BC=D0=B0=D0=BD=D0=B4=D0=B0 (running command): CREATE TEXT SEA= RCH DICTIONARY > "public"."thesaurus_apteka25" ( > TEMPLATE =3D "pg_catalog"."thesaurus", > dictfile =3D 'apteka25', dictionary =3D 'ispell_apteka25' ); Yeah, this is a consequence of the security changes we made awhile back to run dump and restore under restrictive search_path settings. You need to explicitly schema-qualify that sub-dictionary name, since it isn't in the pg_catalog schema. Unfortunately, since dictionary parameters are just strings without a lot of fixed semantics to them, pg_dump can't really fix this for you --- it doesn't know that that parameter refers to a database object, or which database object. > If i change argument dictionary for this note to: dictionary =3D > 'public.ispell_apteka25' - it's now ok! Yup, that's what you have to do. Note that this is a good thing anyway, independently of pg_dump, because your old definition could have failed if the thesaurus dictionary were invoked by any application running under a nondefault search_path. regards, tom lane