[SQL] Re: Order of evaluation in triggers for checks on inherited table partitions

2011-05-30 Thread Jasen Betts
On 2011-05-27, Kevin Crain wrote: > I am trying to create a trigger on updates to a table that is > partitioned. The child tables are partitioned by month and include > checks on a timestamp field. > However when I try to update an existing record with a > timestamp that would place it in a chi

[SQL] Function to total reset a schema

2011-05-30 Thread Surfing
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 s

Re: [SQL] Function to total reset a schema

2011-05-30 Thread Rob Sargent
I would hope you have readily at hand the ddl for the schema in question. Then it's simply a matter of drop schema 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