Re: pl/pgsql enabled by default

From: Rod Taylor <pg(at)rbt(dot)ca>
To: Mike Mascari <mascarm(at)mascari(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Andrew Sullivan <ajs(at)crankycanuck(dot)ca>, Neil Conway <neilc(at)samurai(dot)com>
Subject: Re: pl/pgsql enabled by default
Date: 2005-05-08 11:39:33
Message-ID: 1115552373.683.30.camel@home
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 2. Issue a query like:
>
> SELECT *
> FROM view_of_salaries_based_on_current_user
> WHERE my_side_effect_function_that_inserts_into_a_temp_table(salary,
> employee);

An SRF will guarantee an execution order and work for security purposes,
but getting your function with side effects to run early would be rather
challenging. Somehow you would need to make the planner think the
function is fairly selective without it actually being that way and the
only way that I'm aware of to get the planner to consider a functions
selectivity is to index it. But how do you index the function without
knowing all of the values?

--

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2005-05-08 11:59:52 Re: Patch for collation using ICU
Previous Message Devrim GUNDUZ 2005-05-08 09:54:51 Will new release require an initdb?