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 1i5uXY-0001GG-Ux for pgsql-general@arkaria.postgresql.org; Thu, 05 Sep 2019 16:23:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i5uXX-0007FJ-KG for pgsql-general@arkaria.postgresql.org; Thu, 05 Sep 2019 16:23:19 +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 1i5uXX-0007FC-AA for pgsql-general@lists.postgresql.org; Thu, 05 Sep 2019 16:23:19 +0000 Received: from 195-159-176-226.customer.powertech.no ([195.159.176.226] helo=blaine.gmane.org) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i5uXU-0002ai-Un for pgsql-general@postgresql.org; Thu, 05 Sep 2019 16:23:18 +0000 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1i5uXR-000lW4-2e for pgsql-general@postgresql.org; Thu, 05 Sep 2019 18:23:13 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-general@postgresql.org From: Lele Gaifax Subject: Re: Cannot restore dump when using IS DISTINCT FROM on a HSTORE column Date: Thu, 05 Sep 2019 18:23:07 +0200 Organization: Nautilus Entertainments Message-ID: <87sgpa4sr8.fsf@metapensiero.it> References: <87woem4ymk.fsf@metapensiero.it> <23539.1567694137@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cancel-Lock: sha1:So3uAubiktCfMqELg8sV3OjRDqs= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Tom Lane writes: > If you have the dump in a text file you could just edit it and remove > that line (it's only about a dozen lines in, typically). Otherwise > you could delete it with sed or the like, roughly > > pg_restore dumpfile | sed s'/^SELECT pg_catalog.set_config('search_path', '', false);//' | psql targetdb Great, I can easily do that! I missed the "rewrite-dump-as-sql-script" functionality of pg_restore. Thanks a lot, also to Adrian! bye, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. lele@metapensiero.it | -- Fortunato Depero, 1929.