Re: Rules: A Modest Proposal

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: Rules: A Modest Proposal
Дата
Msg-id 20091004224233.GM4964@fetter.org
обсуждение исходный текст
Ответ на Re: Rules: A Modest Proposal  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Rules: A Modest Proposal  (Stephen Frost <sfrost@snowman.net>)
Re: Rules: A Modest Proposal  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Sun, Oct 04, 2009 at 04:07:40PM -0400, Robert Haas wrote:
> On Sun, Oct 4, 2009 at 3:34 PM, David Fetter <david@fetter.org> wrote:
> >> What would be the benefit of this radical proposal?
> >
> > The radical proposal was the RULE system.  It's been tested now,
> > and it's pretty much failed.
> 
> You still haven't explained what actual benefit we'd get out of
> doing this.

Removing land mines is a benefit.

> I agree that rules, except for SELECT rules, don't seem to be very
> useful.  Perhaps others have found them so, but I have found
> triggers to be a better fit for everything that I ever want to do.
> Every time I think, hmm, maybe I could use a rule for that, I reread
> the chapter and change my mind.

It's people who either don't read the chapter or don't change their
mind who get in all that trouble.  Actually using RULEs is just
cruisin' for a bruisin'.

> However, there is a very real possibility that there are people out
> there who have applications that are based on the way rules work
> today.  If we were to remove support for rules, they would not be able
> to upgrade past 8.4.  That seems to me to be the sort of thing that we
> wouldn't want to do unless we had a good reason - and the closest
> you've come to saying what you think that reason might be is "they're
> mostly a foot-gun", which I don't find very compelling.

In another post, I proposed a deprecation and removal strategy.  If
someone has a use case I haven't named, they've yet to chime in.  Of
course, it's a little early yet, but I've seen a *lot* of PostgreSQL
deployments, and none of them had RULEs for anything but the cases I
mentioned.

> I think we want to be moving in the direction of making upgrading
> easier, not more difficult, and that means maintaining backward
> compatibility even for features that are of marginal utility, unless
> they're getting in the way of something else.

Well, there's a utilitarian argument for not having land mines in our
code.  To call what RULEs can do to your assumptions about how things
work (data integrity, etc.) in PostgreSQL, "astonishing" would be an
understatement.

As for the upgrades, you've made an interesting point.  I suspect that
for the cases mentioned, there could be a mechanical way to do what
needs doing.

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Buffer usage in EXPLAIN and pg_stat_statements (review)
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Rules: A Modest Proposal