trigger when clause

From: Andy Chambers <achambers(at)mcna(dot)net>
To: pgsql <pgsql-general(at)postgresql(dot)org>
Cc: Kenneth Tilton <ktilton(at)mcna(dot)net>
Subject: trigger when clause
Date: 2012-04-10 20:15:18
Message-ID: CAAfW55rmWBinBaoSH7sWHhegJ4zQpHhZvg+ayYby0Jtbqtw6Ew@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

Does anyone know the time complexity of the algorithm used to handle
triggers with a when clause?

To make this a little more concrete, what is likely to perform better

a) A single trigger with "n" if/else clauses
b) A set of "n" triggers each using a different when clause.

What if n is 10?
What if n is 200?

The when clause would just be comparing a text "predicate" column for
equality.

Cheers,
Andy

--
Andy Chambers
Software Engineer
(e) achambers(at)mcna(dot)net
(t) 954-682-0573

CONFIDENTIALITY NOTICE: This electronic mail may contain information that
is privileged, confidential, and/or otherwise protected from disclosure to
anyone other than its intended recipient(s). Any dissemination or use of
this electronic mail or its contents by persons other than the intended
recipient(s) is strictly prohibited. If you have received this
communication in error, please notify the sender immediately by reply
e-mail so that we may correct our internal records. Please then delete the
original message. Thank you.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2012-04-10 20:50:19 Re: Pg 9.1.3 pg_crypto question
Previous Message Kenneth Tilton 2012-04-10 20:07:39 efficient trigger function selection?