pg_dump -a - Mailing list pgsql-general

From Ian Harding
Subject pg_dump -a
Date
Msg-id sd75dba0.004@mail.tpchd.org
Whole thread Raw
List pgsql-general
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"


pgsql-general by date:

Previous
From: Oliver Elphick
Date:
Subject: Re: encoding & formatting for this list?
Next
From: Jean-Christian Imbeault
Date:
Subject: Result output: how-to not have header and footers?