Re: [GENERAL] truncate all tables?

2005-06-29 Thread Doug Bloebaum
On 6/29/05, Zlatko Matić <[EMAIL PROTECTED]> wrote: > > How could I truncate, delete all content of all tables in one step ? You could use a query to generate the statements in psql: \t \o trunc_all.out SELECT 'TRUNCATE ' || table_name || ';' FROM information_schema.tables WHERE table_sche

Re: [GENERAL] truncate all tables?

2005-06-29 Thread Michael Glaesemann
On Jun 29, 2005, at 7:04 PM, Richard Huxton wrote: Zlatko Matić wrote: How could I truncate, delete all content of all tables in one step ? Something like this? pg_dump --schema-only mydb > mydb.schema.dump dropdb mydb psql -f mydb.schema.dump mydb That's nice! Michael Glaesemann grzm

Re: [GENERAL] truncate all tables?

2005-06-29 Thread Richard Huxton
Zlatko Matić wrote: How could I truncate, delete all content of all tables in one step ? Something like this? pg_dump --schema-only mydb > mydb.schema.dump dropdb mydb psql -f mydb.schema.dump mydb -- Richard Huxton Archonet Ltd ---(end of broadcast)-

Re: [GENERAL] truncate all tables?

2005-06-29 Thread Michael Glaesemann
On Jun 29, 2005, at 6:34 PM, Zlatko Matić wrote: How could I truncate, delete all content of all tables in one step ? The PostgreSQL documentation is quite good. I recommend looking through it. http://www.postgresql.org/docs/8.0/interactive/index.html In particular, here: http://www.post

[GENERAL] truncate all tables?

2005-06-29 Thread Zlatko Matić
How could I truncate, delete all content of all tables in one step ?