Re: Partition: use triggers instead of rules

From: David Fetter <david(at)fetter(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Docs <pgsql-docs(at)postgresql(dot)org>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Partition: use triggers instead of rules
Date: 2007-11-29 00:53:34
Message-ID: 20071129005334.GN24146@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-patches

On Wed, Nov 28, 2007 at 05:17:38PM -0500, Tom Lane wrote:
> David Fetter <david(at)fetter(dot)org> writes:
> > On Wed, Nov 28, 2007 at 03:53:04PM -0500, Tom Lane wrote:
> >> Entirely removing the example of how to do it with rules doesn't
> >> seem like a good idea.
>
> > It does to me. I haven't found a case yet where rules worked even
> > as well as triggers.
>
> I don't have a problem with emphasizing triggers as the preferred
> solution, but we should keep the older example, if only because
> people are going to see DB schemas that use that approach, and they
> won't understand what's going on (or realize they could convert) if
> they've not seen an example.

Greg Sabino Mullane managed to contrive an example where RULEs might
conceivably be the least-bad way to do this, that being a machine
where no PLs may be installed.

Telling people how to do this is not *quite* as bad as describing how
to do EAV, but it's pretty close.

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

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

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Alvaro Herrera 2007-11-29 01:06:01 Re: Partition: use triggers instead of rules
Previous Message Guillaume Lelarge 2007-11-28 22:42:16 Re: Two fixes for plpgsql.sgml

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2007-11-29 01:06:01 Re: Partition: use triggers instead of rules
Previous Message Bruce Momjian 2007-11-28 22:45:01 Re: proposed patch for function parameters name refs