Re: pg_dump: [archiver] -C and -c are incompatible options

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Carlos Carcamo <eazyduiz(at)gmail(dot)com>, : PostgreSQL mailing lists <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_dump: [archiver] -C and -c are incompatible options
Date: 2014-09-23 23:19:18
Message-ID: 5421FFF6.7030806@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 09/23/2014 04:01 PM, Carlos Carcamo wrote:
> Hello list, I need some help with this error:
> ...
> pg_dump: saving encoding = UTF8
> pg_dump: saving standard_conforming_strings = on
> pg_dump: [archiver] -C and -c are incompatible options
> pg_dump: *** aborted because of error
>
> Process returned exit code 1.
>
> I get this error when i'm trying to create a backup of some of my
> tables of the database, i'm using pgadmin3, I've searched on internet
> about it, but I couldn't find useful info.
>
> I will appreciate any help, thanks in advance.

According to pgAdmin3 you cannot use both -C and -c at the same time.

Not sure why:
http://www.postgresql.org/docs/9.3/interactive/app-pgdump.html

-c
--clean

Output commands to clean (drop) database objects prior to
outputting the commands for creating them. (Restore might generate some
harmless error messages, if any objects were not present in the
destination database.)

This option is only meaningful for the plain-text format. For the
archive formats, you can specify the option when you call pg_restore.

-C
--create

Begin the output with a command to create the database itself and
reconnect to the created database. (With a script of this form, it
doesn't matter which database in the destination installation you
connect to before running the script.) If --clean is also specified, the
script drops and recreates the target database before reconnecting to it.

This option is only meaningful for the plain-text format. For the
archive formats, you can specify the option when you call pg_restore.

What version of pgAdmin3 are you using?

What options are you using when running the pgAdmin3 backup tool?

I ask because pgAdmin will not issue a CREATE DATABASE by default.

>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2014-09-23 23:19:49 Re: pg_dump: [archiver] -C and -c are incompatible options
Previous Message Carlos Carcamo 2014-09-23 23:01:12 pg_dump: [archiver] -C and -c are incompatible options