Search Postgresql Archives

Re: Dumping part (not all) of the data in a database...methods?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 11. April 2007 19:50, Andrew Edson wrote:
>I'm needing to do a partial dump on a database.  All of the entries in
> the db can be marked as one of two groups, and I've been asked to
> create a dump of just the second group.  It is possible to do a
> select statement based dump and just grab the one set of records in
> the output?

I had a similar problem with my genealogy database, of which I'm making 
regular exports to the Web. In order to not publish data on living 
people, I've got a boolean flag is_public. For me, the easiest way to 
export a "washed" subset of the data, was writing a custom Python 
script. It also enabled me to transform the data in other ways, as the 
script is reading from special views and makes a "flattened" image of 
the database, more suitable for Web -- or at least for the Swedish 
dolphin stuff which I'm still using on my Website :-)

As I'm no Python guru, the code is rather simplistic. But it does its 
job well enough for me. If you want a copy of the script, just drop me 
a mail.
-- 
Leif Biberg Kristensen | Registered Linux User #338009
http://solumslekt.org/ | Cruising with Gentoo/KDE
My Jazz Jukebox: http://www.last.fm/user/leifbk/


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux