Обсуждение: pg_dump: [archiver] -C and -c are incompatible options

Поиск
Список
Период
Сортировка

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

От
Carlos Carcamo
Дата:
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.

--
"El desarrollo no es material es un estado de conciencia mental"


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

От
Adrian Klaver
Дата:
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.klaver@aklaver.com


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

От
Tom Lane
Дата:
Carlos Carcamo <eazyduiz@gmail.com> writes:
> 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

Like it says, you should not use both the -C and -c command-line options
to pg_dump.  I'm not sure how that translates to what you're doing in
pgAdmin3, but presumably you're selecting some incompatible options there.

You might want to gripe about it on the pgadmin mailing list (not here),
as it seems like they could provide a more user-friendly complaint.

            regards, tom lane


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

От
David G Johnston
Дата:
Tom Lane-2 wrote
> Carlos Carcamo <

> eazyduiz@

> > writes:
>> 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
>
> Like it says, you should not use both the -C and -c command-line options
> to pg_dump.  I'm not sure how that translates to what you're doing in
> pgAdmin3, but presumably you're selecting some incompatible options there.
>
> You might want to gripe about it on the pgadmin mailing list (not here),
> as it seems like they could provide a more user-friendly complaint.

What version of PostgreSQL?

9.3 documentation indicates that using both together should work.

Are you maybe hitting an older database with a newer version of pgadmin?

David J.




--
View this message in context:
http://postgresql.1045698.n5.nabble.com/pg-dump-archiver-C-and-c-are-incompatible-options-tp5820220p5820259.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


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

От
Tom Lane
Дата:
David G Johnston <david.g.johnston@gmail.com> writes:
> Tom Lane-2 wrote
>> Like it says, you should not use both the -C and -c command-line options
>> to pg_dump.  I'm not sure how that translates to what you're doing in
>> pgAdmin3, but presumably you're selecting some incompatible options there.
>>
>> You might want to gripe about it on the pgadmin mailing list (not here),
>> as it seems like they could provide a more user-friendly complaint.

> What version of PostgreSQL?
> 9.3 documentation indicates that using both together should work.

Oh, I'd forgotten that, but you're right.  A quick test shows that it
changed in 9.2.

> Are you maybe hitting an older database with a newer version of pgadmin?

Older pg_dump in particular.  Seems like a good bet.

A gripe to the pgadmin folks might still be in order; I'd think it was
within their charter to shield users from this sort of version
compatibility consideration.

            regards, tom lane