| From: | Rob Sargent <robjsargent(at)gmail(dot)com> |
|---|---|
| To: | Surfing <onlinesurfing(at)gmail(dot)com> |
| Cc: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: Function to total reset a schema |
| Date: | 2011-05-30 14:45:26 |
| Message-ID: | 4DE3AD86.5020206@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
I would hope you have readily at hand the ddl for the schema in
question. Then it's simply a matter of drop schema <name> cascade and
re-run you ddl scripts.
Surfing wrote:
> Hi all,
> I need to write a function that totally empty a schema.
>
> So I have written a TRUNCATE statement for each table and set to 0
> each sequence.
> Btw, it could be good to execute a vacuum statement on each table, but
> from within the function this is not allowed.
>
> Is there a way to obtain the same result in another way (without using
> the vacuum)?
>
> Thanks
>
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kevin Crain | 2011-05-31 13:40:19 | Re: Re: Order of evaluation in triggers for checks on inherited table partitions |
| Previous Message | Jasen Betts | 2011-05-30 09:21:19 | Re: Order of evaluation in triggers for checks on inherited table partitions |