Re: indexes on functions and create or replace function

From: "Matthew Dennis" <mdennis(at)merfer(dot)net>
To: Christophe <xof(at)thebuild(dot)com>
Cc: "PGSQL General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: indexes on functions and create or replace function
Date: 2008-08-29 02:04:07
Message-ID: e94d85500808281904j774fdc83g2b53a013059e4e84@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Aug 28, 2008 at 8:15 PM, Christophe <xof(at)thebuild(dot)com> wrote:

>
> On Aug 28, 2008, at 6:10 PM, Matthew Dennis wrote:
>
>> I'm not sure I follow. Couldn't you track which statements were prepared
>> that called a function and either reprepare (just like reindex, recheck,
>> etc) or in the case of dropping a function, refuse to drop it because
>> something depends on it?
>>
>
> EXECUTE in PL/pgSQL accepts a string and executes it as a statement.
> (That's different from the SQL-level EXECUTE.) I'm not sure how one would
> track dependencies there.

Yes, sorry about that - it should have been obvious the execute you were
talking about from the context. In any case, you don't track dependencies
there for the same reason you don't track what SQL my application sends.
The plpgsql execute statement, as I understand it, means "take this string
and execute like a client sent it to you". It's explicit in the
definition/description/documentation of the function that you aren't
executing a "static" thing that would have dependencies you would track.
However, when you used execute, you should get no different repsonse than
what a client would get under the same circumstances.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christophe 2008-08-29 02:09:44 Re: indexes on functions and create or replace function
Previous Message Christophe 2008-08-29 02:01:45 Re: indexes on functions and create or replace function