Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hkrJR-0001e2-Nx for pgsql-general@arkaria.postgresql.org; Tue, 09 Jul 2019 14:41:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hkrJQ-0003jD-Hv for pgsql-general@arkaria.postgresql.org; Tue, 09 Jul 2019 14:41:44 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1hkrJQ-0003hT-6Z for pgsql-general@lists.postgresql.org; Tue, 09 Jul 2019 14:41:44 +0000 Received: from mail-oi1-x22f.google.com ([2607:f8b0:4864:20::22f]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hkrJN-0007gu-WF for pgsql-general@postgresql.org; Tue, 09 Jul 2019 14:41:43 +0000 Received: by mail-oi1-x22f.google.com with SMTP id l12so15552669oil.1 for ; Tue, 09 Jul 2019 07:41:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lucee.org; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=RS2tE/KatWPxev/WF3m+2B2b9mgp8A0xIybnu5Cs7t8=; b=HdDDfQwh7qoK7nz9dkoDjusU55sooei2RJOsIWTwk6pS87ZvCwi9rH1LbOKDnAAZ3o j5lqN+fR1dS9OvdM1+1zSjw1A0lIC58QKZ6kkssF0qYGyPP54ekMaEoimSeV3kkxkL18 3adHceEmp1IDaqvI50gJwfCT6EoVuRyEdhvf4ti2Ej0vlI7d1j/gPLEGe6VZDx0XwdsI BYfUYmuTTvjTcojaZaiOZCCz14PJr8qOqwM6cWcYvpadb2F9NUCo12d5YVlFJksI0ggU 6HxXiIWgu5p+GNb/Dwd6aJqVxNCDnQARWCSBL7T0Wg8c4tYhar157GHRzeaR2Cz3iElq u/iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=RS2tE/KatWPxev/WF3m+2B2b9mgp8A0xIybnu5Cs7t8=; b=pDIDtKDQ3TPfBtV3Vj61HA6lUiumxrGzQj0mUzIggkXAJCzohKWfxJsmbE80M504q3 ZJK0pCm/ZAUWWhpjeraQdnYuPE5KReKGWH1wZARsMwGIssBVre3fbFFwarfvVZSqKepc 5bTta60K1+jWTR4yzMJjUcwjX6P0a5y0t9cK1hI+imDNd94ijjBE1FSDk76p+73CKksU OsPByODMZPr7GS4en9sUDFFkb1uHl1ms3HuNDLhZXy74f6Z511kCPpDYvt2aiMajoDHS YuX2snG3qZEZNs1QzW1EtJrGrgeLufTJIZlM2+A0rPh4ZJxQnW46dhxo9KE45lPIu+/c L/dQ== X-Gm-Message-State: APjAAAV5eQo+QjIbjmYxfnVfIaps4CdUvAgbLWvGJNeV0pLOv5DgQtIl f6oYY/eje5qA540IeDn3lMG9nT9RSYg= X-Google-Smtp-Source: APXvYqxkh5R+0qQuCWJy7hRwAqKBnQMNyG4oDtmBOxLZFnrYZ5xbgge6V5g3vktBcY/Tyc1PJgt3Ag== X-Received: by 2002:aca:6044:: with SMTP id u65mr196825oib.25.1562683299685; Tue, 09 Jul 2019 07:41:39 -0700 (PDT) Received: from ?IPv6:2600:1700:4000:8120:e4a2:d970:b88f:f5fa? ([2600:1700:4000:8120:e4a2:d970:b88f:f5fa]) by smtp.googlemail.com with ESMTPSA id o32sm7544958ota.37.2019.07.09.07.41.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jul 2019 07:41:39 -0700 (PDT) Subject: Re: pg_dump and search_path To: Adrian Klaver , pgsql-general References: <1f5111a5-e49e-e44a-67df-b367e5d31fdf@lucee.org> <94e28e8c-e5cf-f0b5-a148-43452446d9ec@aklaver.com> From: "Igal @ Lucee.org" Message-ID: Date: Tue, 9 Jul 2019 07:41:37 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <94e28e8c-e5cf-f0b5-a148-43452446d9ec@aklaver.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 7/9/2019 7:02 AM, Adrian Klaver wrote: > On 7/8/19 11:48 PM, Igal @ Lucee.org wrote: >> I have a custom search_path: >> >> # show search_path; >>             search_path >> ---------------------------------- >>   "staging, transient, pg_catalog" >> (1 row) >> >> I ran `pg_dump --schema-only` and the only reference in the output to >> search_path is: >> >>    SELECT pg_catalog.set_config('search_path', '', false); >> >> Then one of my functions which does not reference the full name of a >> table with its schema fails with "relation [rel-name] does not exist". > > Where is this failing? > > Do you have the search_path set in the config for the server you are > dumping to? It is failing during the Restore operation.  I can provide more information if I'll understand what you mean exactly by "Where". search_path is not set int he config, but rather with ALTER DATABASE SET search_path TO ... but I have executed that prior to the RESTORE on the target database.  Would it make a difference if I set it in the config? Thanks, Igal