Re: interesting trigger behaviour in 8.3

From: "Ivan Zolotukhin" <ivan(dot)zolotukhin(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: interesting trigger behaviour in 8.3
Date: 2008-07-31 11:17:33
Message-ID: 751e56400807310417u264f4000h357d4880a3a3279a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jul 29, 2008 at 7:52 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Ivan Zolotukhin" <ivan(dot)zolotukhin(at)gmail(dot)com> writes:
>> In pseudo code it looks like the following. There are 2 tables, empty
>> abstract_table with 3 columns (id, col1, col2) and many tables (e.g.
>> inherited_table1_with_data) that inherit abstract_table.
>> Constraint_exclusion is set up on id column and works perfectly. So
>> we've got update like this
>
>> UPDATE abstract_table SET col1 = 1, col2 = 2 WHERE id = 12345;
>
> I bet it does not *really* look like that, but has a parameterized
> WHERE clause. As per the fine manual:
>
> Constraint exclusion only works when the query's WHERE clause
> contains constants. A parameterized query will not be optimized,
> since the planner cannot know which partitions the parameter value
> might select at run time. For the same reason, "stable" functions
> such as CURRENT_DATE must be avoided.

Thank you Tom for your remark. I just missed this point from the docs.

--
Regards,
Ivan

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Reko Turja 2008-07-31 12:11:24 Re: Shared object "libpq.so.3" not found
Previous Message marko 2008-07-31 10:53:32 Re: Shared object "libpq.so.3" not found