pg_dump -a

From: "Ian Harding" <ianh(at)tpchd(dot)org>
To: <pgsql-general(at)postgresql(dot)org>
Subject: pg_dump -a
Date: 2002-09-04 17:06:50
Message-ID: sd75dba0.004@mail.tpchd.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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. When I 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 went ahead 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(at)tpchd(dot)org

"La Union es la Fuerza"

Browse pgsql-general by date

  From Date Subject
Next Message Jean-Christian Imbeault 2002-09-04 17:31:26 Result output: how-to not have header and footers?
Previous Message Linn Kubler 2002-09-04 17:02:32 Re: show ?