Re: pg_dump: Exclude multiple tables in version 7.4

Поиск
Список
Период
Сортировка
От Melvin Davidson
Тема Re: pg_dump: Exclude multiple tables in version 7.4
Дата
Msg-id 2CC69F840555CB43B04195F218CCB57F9A0C7F@COENGEX01.cctus.com
обсуждение исходный текст
Ответ на pg_dump: Exclude multiple tables in version 7.4  (cha <chandresh.rana@metrixline.com>)
Список pgadmin-support
>I knw that I have to use include instead of excluding the tables.Do I
have to include each and
>>every tables manually or is there way to do that?

There's no guarantee. but the following query might be a
good starting point to build your include list.

It selects only tables with less than 3000 tuples
(naturally you will change the value to suit your needs.

Note that per the documenatation:
"This is only an estimate used by the planner.
 It is updated by VACUUM, ANALYZE,
 and a few DDL commands such as CREATE INDEX."

So a FULL VACUUM is advised before executing.

SELECT n.nspname || ' .' || c.relname AS tablename
   FROM pg_class c
   LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
   LEFT JOIN pg_tablespace t ON t.oid = c.reltablespace
  WHERE c.relkind = 'r'::"char"
        AND reltuples < 3000
ORDER BY n.nspname;


Melvin Davidson
Database Developer
Computer & Communication Technologies, Inc.
6 Inverness Court East, Suite 220
Englewood, CO  80112

Вложения

В списке pgadmin-support по дате отправления:

Предыдущее
От: Raymond O'Donnell
Дата:
Сообщение: Re: Re : pg_dump: ALTER SEQUENCE ... OWNED in 8.1
Следующее
От: Marcin Zajączkowski
Дата:
Сообщение: Re: pgadmin 1.6.3 - segmentation fault