| From: | Joep DeVocht <joep(at)masktools(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Clearing tables questions |
| Date: | 2003-01-31 01:29:11 |
| Message-ID: | 3E39D167.AF39FFBD@masktools.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Hi,
I have two fairly simple questions (I think) but I can't
seem to find the answer in the docs or mailing-lists.
I'm using pg_dump and pg_restore to backup my dbase.
However, I noticed that when I do a pg_restore, the
dumped contents are added to the currents ones.
This is not what I want. The tables should be cleared first.
How do I do this initializing the dbase?
Another question I have is the following.
What sql command can I use to clear (delete) all tables not
starting with 'pg_'.
I can easily come up with a query that gives me all tables with
the specified prefix. But when I try to 'loop' using a cursor
I run into all kind of syntax problems.
I'd be very happy if you can help me with any of these questions.
thanx in advance,
Joep.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2003-01-31 01:34:45 | Re: Weird query plans for my queries, causing terrible performance. |
| Previous Message | Tom Lane | 2003-01-31 00:21:32 | Re: Security Question |