pg_dump without any SET command in header of output plain text sql file

Started by Alex Ignatovover 9 years ago6 messagesgeneral
Jump to latest
#1Alex Ignatov
a.ignatov@postgrespro.ru

Hello everyone!

Is there any way to make pg_dump(9.5) to dump table (with data) without
any SET command in the header of output plain sql file?

P.S. Yeah I know about sedding =)

--
Alex Ignatov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alex Ignatov (#1)
Re: pg_dump without any SET command in header of output plain text sql file

Alex Ignatov <a.ignatov@postgrespro.ru> writes:

Is there any way to make pg_dump(9.5) to dump table (with data) without
any SET command in the header of output plain sql file?

No, but if all you want is the table data in a file, why not just use COPY?

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Sameer Kumar
sameer.kumar@ashnik.com
In reply to: Alex Ignatov (#1)
Re: pg_dump without any SET command in header of output plain text sql file

On Thu, 21 Jul 2016, 1:17 a.m. Alex Ignatov, <a.ignatov@postgrespro.ru>
wrote:

Hello everyone!

Is there any way to make pg_dump(9.5) to dump table (with data) without
any SET command in the header of output plain sql file?

Yeah you need to use specific switch/option to disable each set command

P.S. Yeah I know about sedding =)

--
Alex Ignatov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

--
--
Best Regards
Sameer Kumar | DB Solution Architect
*ASHNIK PTE. LTD.*

101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533

T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

#4Alex Ignatov
a.ignatov@postgrespro.ru
In reply to: Sameer Kumar (#3)
Re: pg_dump without any SET command in header of output plain text sql file

And what is the options you mentioned about?

Alex Ignatov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Show quoted text

On 20.07.2016 21:02, Sameer Kumar wrote:

On Thu, 21 Jul 2016, 1:17 a.m. Alex Ignatov, <a.ignatov@postgrespro.ru
<mailto:a.ignatov@postgrespro.ru>> wrote:

Hello everyone!

Is there any way to make pg_dump(9.5) to dump table (with data)
without
any SET command in the header of output plain sql file?

Yeah you need to use specific switch/option to disable each set command

P.S. Yeah I know about sedding =)

--
Alex Ignatov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org
<mailto:pgsql-general@postgresql.org>)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

--
--
Best Regards
Sameer Kumar | DB Solution Architect
*ASHNIK PTE. LTD.*

101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533

T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

#5Sameer Kumar
sameer.kumar@ashnik.com
In reply to: Alex Ignatov (#4)
Re: pg_dump without any SET command in header of output plain text sql file

On Thu, Jul 21, 2016 at 7:14 PM Alex Ignatov <a.ignatov@postgrespro.ru>
wrote:

And what is the options you mentioned about?

I stand corrected.
I think the only ones you can avoid are OWNERSHIP and TABLESPACE commands.

I think sed would be the best tool here.

Alex Ignatov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

On 20.07.2016 21:02, Sameer Kumar wrote:

On Thu, 21 Jul 2016, 1:17 a.m. Alex Ignatov, <a.ignatov@postgrespro.ru>
wrote:

Hello everyone!

Is there any way to make pg_dump(9.5) to dump table (with data) without
any SET command in the header of output plain sql file?

Yeah you need to use specific switch/option to disable each set command

P.S. Yeah I know about sedding =)

--
Alex Ignatov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

--
--
Best Regards
Sameer Kumar | DB Solution Architect
*ASHNIK PTE. LTD.*

101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533

T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

--

--
Best Regards
Sameer Kumar | DB Solution Architect
*ASHNIK PTE. LTD.*

101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533

T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

#6Alex Ignatov
a.ignatov@postgrespro.ru
In reply to: Sameer Kumar (#5)
Re: pg_dump without any SET command in header of output plain text sql file

Ok, thanks !

Alex Ignatov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Show quoted text

On 22.07.2016 06:49, Sameer Kumar wrote:

On Thu, Jul 21, 2016 at 7:14 PM Alex Ignatov <a.ignatov@postgrespro.ru
<mailto:a.ignatov@postgrespro.ru>> wrote:

And what is the options you mentioned about?

I stand corrected.
I think the only ones you can avoid are OWNERSHIP and TABLESPACE
commands.

I think sed would be the best tool here.

Alex Ignatov
Postgres Professional:http://www.postgrespro.com
The Russian Postgres Company

On 20.07.2016 21:02, Sameer Kumar wrote:

On Thu, 21 Jul 2016, 1:17 a.m. Alex Ignatov,
<a.ignatov@postgrespro.ru <mailto:a.ignatov@postgrespro.ru>> wrote:

Hello everyone!

Is there any way to make pg_dump(9.5) to dump table (with
data) without
any SET command in the header of output plain sql file?

Yeah you need to use specific switch/option to disable each set
command

P.S. Yeah I know about sedding =)

--
Alex Ignatov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

--
Sent via pgsql-general mailing list
(pgsql-general@postgresql.org
<mailto:pgsql-general@postgresql.org>)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

--
--
Best Regards
Sameer Kumar | DB Solution Architect
*ASHNIK PTE. LTD.*

101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533

T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

--
--
Best Regards
Sameer Kumar | DB Solution Architect
*ASHNIK PTE. LTD.*

101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533

T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com