Обсуждение: pg_dump -a

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

pg_dump -a

От
"Ian Harding"
Дата:
Is the -a option supposed to dump just data or is it supposed to include user defined types and (some) functions?

I am implementing contrib/ltree.  I use a data only dump to reload data after re-creating tables from another script.
WhenI do this: 

createdb foobar
psql foobar < ltree.sql
pg_dump -a foobar > foobar.dump

the resulting file contains CREATE TYPE and CREATE FUNCTION statements that are necessary for the ltree implementation.
My (minor) problem is that I don't need them in there and they create extraneous error messages. 

Of course, I do actually need the type and supporting functions, but I need them earlier (when I create the tables).  I
wentahead and did  

psql template1 < ltree.sql

I hope that was smart.  It seems to work OK, creating the necessary bits in new databases.

Ian A. Harding
Programmer/Analyst II
Tacoma-Pierce County Health Department
(253) 798-3549
iharding@tpchd.org

"La Union es la Fuerza"