Skip site navigation (1) Skip section navigation (2)

Re: Table rewrites vs. pending AFTER triggers

From: "Gokulakannan Somasundaram" <gokul007(at)gmail(dot)com>
To: "Martijn van Oosterhout" <kleptog(at)svana(dot)org>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Andrew Dunstan" <adunstan(at)postgresql(dot)org>, "Simon Riggs" <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Table rewrites vs. pending AFTER triggers
Date: 2008-01-03 10:32:13
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Jan 3, 2008 3:53 PM, Martijn van Oosterhout <kleptog(at)svana(dot)org> wrote:

> 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
> example:
> - 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
> wrong.
> - 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...

Thanks.. it looks like a good feature...


In response to

pgsql-hackers by date

Next:From: Albe LaurenzDate: 2008-01-03 10:55:40
Subject: Re: Table rewrites vs. pending AFTER triggers
Previous:From: Martijn van OosterhoutDate: 2008-01-03 10:23:31
Subject: Re: Table rewrites vs. pending AFTER triggers

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group