On Thu, Jan 03, 2008 at 01:08:47PM +0530, Gokulakannan Somasundaram wrote:
> Can you please explain, any specific use-case where DDLs are necessary
> within a transaction?
I don't think they are ever necessary, they're just very very nice. For
- You want a new column to appear populated on a table atomically. You
do a BEGIN; add column; update set column=foo; add foreign key; COMMIT
- Installation of external modules can be done atomically, so you don't
end up with half installed contrib modules.
- Principle of Least Surprise. Automatic commit for any reason seems
- Temporarily disabling triggers/indexes/constraints, if the system
aborts/crashes, the triggers are reinstated automatically.
- Just general niceity of being able to test schema changes without
immediatly changing the system.
There are many more...
Have a nice day,
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution inevitable.
> -- John F Kennedy
In response to
pgsql-hackers by date
|Next:||From: Gokulakannan Somasundaram||Date: 2008-01-03 10:32:13|
|Subject: Re: Table rewrites vs. pending AFTER triggers|
|Previous:||From: Simon Riggs||Date: 2008-01-03 09:44:25|
|Subject: Re: Dynamic Partitioning using Segment Visibility Maps|