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

2007-04-15 Thread Angelo
What about partitioning the table using bar='criteria' and bar!='criteria' as partitioning condition? You can then decide to dump only the first subtable, the second or all the data with pg_dump. I have similar issues and this is the solution I am working on (still not done). Angelo On

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

2007-04-12 Thread Laurent ROCHE
Hi, AFAIK, you can not do that with pg_dump ... but as you are working on only one table you can write the COPY command your self, and since version 8.2, you can write a SELECT query instead of a table name, like COPY (SELECT * FROM country WHERE country_name LIKE 'A%') TO

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

2007-04-11 Thread Merlin Moncure
On 4/11/07, Andrew Edson [EMAIL PROTECTED] 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

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

2007-04-11 Thread Andrew Edson
I am aware of this, yes, but the data in question is all (both sets) contained on a single table. That's why I was looking for a way to do a 'dump where (select foo where bar = 'criteria')' structure. Merlin Moncure [EMAIL PROTECTED] wrote: On 4/11/07, Andrew Edson wrote: I'm needing to do

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

2007-04-11 Thread John D. Burger
Andrew Edson wrote: I am aware of this, yes, but the data in question is all (both sets) contained on a single table. That's why I was looking for a way to do a 'dump where (select foo where bar = 'criteria')' structure. What if you do that select into a new table, then pg_dump just

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

2007-04-11 Thread Tom Lane
Andrew Edson [EMAIL PROTECTED] writes: I am aware of this, yes, but the data in question is all (both sets) contained on a single table. That's why I was looking for a way to do a 'dump where (select foo where bar = 'criteria')' structure. pg_dump is not in the business of editorializing on

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

2007-04-11 Thread Leif B. Kristensen
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