Troubles from using pg_dumpall with dbname

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

Troubles from using pg_dumpall with dbname

От:
Hannu Krosing <hannu@tm.ee>
Дата:
This is a warning an a request for change in pg_dumpall behaviour.

One of my co-workers accidentally used pg_dumpall instead of pg_dump 
giving it also a dbname argument. According to man pg_dumpall:

  pg_dumpall takes all pg_dump options, but -f and dbname should 
  not be used.

the results of using dbname are quite bizarre - namely it dumps 
statements for creating all existing databases, but inside them 
it puts the contents of the database given by dbname !

As this feature seems to be totally useless, I suggest that 
pg_dumpall be modified to produce an error when given dbname 
argument instead of silently producing mostly useless db dump.

In our case this went unnoticed until he tried to recreate his 
database by doing 'psql dbname 
FAQ