From: | Klint Gore <kg(at)kgb(dot)une(dot)edu(dot)au> |
---|---|
To: | pgsql-general(at)postgreSQL(dot)org |
Subject: | dumping data to version control using pg_dump? |
Date: | 2005-11-24 07:21:30 |
Message-ID: | 438569FA365.AF0EKG@129.180.47.120 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Is there any way to get pg_dump to run a statement before dumping?
I'd like to do something like
pg_dump -a -c "create temp table params as select * from params where key=blah;" -d dev_db -t params -f /svn/db/params.blah
svn commit /svn/db/params.blah
I'd rather avoid doing
psql -c "create table params_svn as select * from params where key = blah;"
pg_dump .....
psql -c "drop table params_svn"
replace tmptablename realtablename
svn commit ...
klint.
+---------------------------------------+-----------------+
: Klint Gore : "Non rhyming :
: EMail : kg(at)kgb(dot)une(dot)edu(dot)au : slang - the :
: Snail : A.B.R.I. : possibilities :
: Mail University of New England : are useless" :
: Armidale NSW 2351 Australia : L.J.J. :
: Fax : +61 2 6772 5376 : :
+---------------------------------------+-----------------+
From | Date | Subject | |
---|---|---|---|
Next Message | Harald Armin Massa | 2005-11-24 07:25:15 | Re: Private email requests |
Previous Message | Bruce Momjian | 2005-11-24 04:47:48 | Private email requests |