From: Ibrahim Harrani <ibrahim.harrani@gmail.com>
To: pgsql-admin@postgresql.org
Subject: pg_dump and drop table if exists statement
Date: Mon, 13 Jun 2011 10:56:27 +0300
Message-ID: <BANLkTim45-uyjEQR5nL9kRBn0D0c_sJf7g@mail.gmail.com> (raw)
Hi,
I am using PostgreSQL 9.0 I would like to dump some tables and all
functions,triggers on the database.
If I drop with pg_dump -c parameter, it removes public schema as
well. pg_dump -C parameter output has create table
but I can't restore this output directly(Because the tables are
already exist on the db)
There is no problem with functions. They have already this feature.
How can backup/restore tables with DROP TABLE IF EXISTS statement like
in MySQL? without dropping all database and create again?
Thanks in advance.
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: ibrahim.harrani@gmail.com
Subject: Re: pg_dump and drop table if exists statement
In-Reply-To: <BANLkTim45-uyjEQR5nL9kRBn0D0c_sJf7g@mail.gmail.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