Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mX5Dk-0007MM-4e for pgsql-general@arkaria.postgresql.org; Sun, 03 Oct 2021 17:24:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mX5Dj-0003my-42 for pgsql-general@arkaria.postgresql.org; Sun, 03 Oct 2021 17:24:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mX5Cv-0004b0-CJ for pgsql-general@lists.postgresql.org; Sun, 03 Oct 2021 17:23:26 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mX5Cs-0004w9-Mf for pgsql-general@lists.postgresql.org; Sun, 03 Oct 2021 17:23:24 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 03E9E5C0109; Sun, 3 Oct 2021 13:23:21 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sun, 03 Oct 2021 13:23:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=G b/jOUcZocQOLfr9a2xJr/PordahbvXz9Hmi6BiFCEo=; b=QFfRTUT5OYH/rTRdJ s2KOEaFYN/wQHYy7cKBGl9k7obEmksBBfVlVapDlfcDijR4IZUa6bRiBVgGhSsYP P++RGRhd08qnj+5ZtwsJTODpVsHul6kOFGzx/IRlDOvNjJgz9ko/bStI0jfzIBEV kiDyS22eY3GW81sRR+w8r1qVw5fp+fxjlpIZaxN985UmSFkIL5+nJdf8DIeBxpwQ xkLX3nxPa/aKsUqp7jANMXB2nkaDnWXVWrOwDMnHkETTqfUDo3ANSZz9o9ZelyA4 Y+ge7OmI6vex7YGtRpf1IFYKNNpDAGNaXhwXp6KmypZDR1KU/dl+y0Jebpl00Iv0 iF9ww== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=Gb/jOUcZocQOLfr9a2xJr/PordahbvXz9Hmi6BiFC Eo=; b=RR4mhEWhPN8WqxnPbraEvmTPsSGvafIIESun09zyiuUiNathsy5D38+hT 8jTTZt0GqfLqxxWwTUBgnWIjfyTc8Q2GX6AkbjXHUfJCkAii7ItypB/5rgS4aPR+ LAmAAFj2y/iXFfAOZ7twF7k/L0Fu8CSzSa7Vw8JueA431ZpwTDY+EH1DTFWjJaPK l4hs++VNBSPtHVpcp+UtwdTXICDImskL1GxCuFyKT/gZ1fH4t1/oT3oJE6dlZyUJ IHPRMGzYie8AsKOw9sKmDdsU8Qp8MFsG1larZST+rXoO5blwiriBRL7k1uLWVnOM s7/IRnmkvYMWauFSFxK17mzWmrdEQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudeltddguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuggftrfgrthhtvghrnhepteejvdetffejuedvleeifeefheeutdfhgfdvhffh hfekvdduveegvdejudefgfevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 3 Oct 2021 13:23:20 -0400 (EDT) Subject: Re: pg_dump save command in output To: Joao Miguel Ferreira Cc: pgsql-general References: From: Adrian Klaver Message-ID: <0868132e-16d2-2d81-18c5-62cd7dc55666@aklaver.com> Date: Sun, 3 Oct 2021 10:23:19 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/3/21 10:15 AM, Joao Miguel Ferreira wrote: > > I just wanted to save the command inside the SQL file to be able to > "remember" it later. ideally I would open the file on some text editor > and see the original pg_dump command on the few first lines, as a comment > > -- original command was: psql -h some_host -p ..... > > > Are you dumping in plain or custom format? > > > plain (SQL) A quick test here found that manually adding: -- original command was: psql -h some_host -p ..... as: -- Dumped by pg_dump version XX.x -- original command was: psql -h some_host -p ..... at head of file did not infer with the restore. No guarantees though. > > > > > > thank you > > Joao > > > > > -- > Adrian Klaver > adrian.klaver@aklaver.com > -- Adrian Klaver adrian.klaver@aklaver.com