pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Joao Miguel Ferreira <joao.miguel.c.ferreira@gmail.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: pg_dump save command in output
Date: Sun, 3 Oct 2021 10:23:19 -0700
Message-ID: <0868132e-16d2-2d81-18c5-62cd7dc55666@aklaver.com> (raw)
In-Reply-To: <CALyyT7SosnM2LwRGKW8xCB9jG5QnsvWT_bGWASkUGqWQ1Zvp3g@mail.gmail.com>
References: <CALyyT7ToQfV8R_L6Xo08QtZzGN5_G7B7wfxKu0X_m71Yb-bf3g@mail.gmail.com>
	<ceed63b3-64f7-ca43-62f1-abc80a5f4e11@aklaver.com>
	<CALyyT7SosnM2LwRGKW8xCB9jG5QnsvWT_bGWASkUGqWQ1Zvp3g@mail.gmail.com>

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 <mailto:adrian.klaver@aklaver.com>
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (10+ messages)  latest in thread

Message-ID: <0868132e-16d2-2d81-18c5-62cd7dc55666@aklaver.com>
Permalink:  ../0868132e-16d2-2d81-18c5-62cd7dc55666@aklaver.com/
Also on:    postgresql.org/message-id/0868132e-16d2-2d81-18c5-62cd7dc55666@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, joao.miguel.c.ferreira@gmail.com
  Subject: Re: pg_dump save command in output
  In-Reply-To: <0868132e-16d2-2d81-18c5-62cd7dc55666@aklaver.com>
  References: <CALyyT7ToQfV8R_L6Xo08QtZzGN5_G7B7wfxKu0X_m71Yb-bf3g@mail.gmail.com> <ceed63b3-64f7-ca43-62f1-abc80a5f4e11@aklaver.com> <CALyyT7SosnM2LwRGKW8xCB9jG5QnsvWT_bGWASkUGqWQ1Zvp3g@mail.gmail.com> <0868132e-16d2-2d81-18c5-62cd7dc55666@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox