Subject Re: [firebird-support] Functions in PL/SQL
Author Lele Gaifax
On Thu, 14 Feb 2008 12:48:07 +0100
"PenWin" <penwin@...> wrote:

> Unfortunatelly, that won't do the trick: I need a function which gets
> applied to every row in a certain view.

You can get almost there with a selectable SP too:

SELECT t.a, t.b, sp.whatever
FROM table t
LEFT JOIN storedproc(t.a, t.b) sp ON 1=1

> So I was thinking of creating a placeholder function in plain PL/SQL,
> which would simply return zero (or better yet, NULL). When the UDF
> got upgraded, I would drop this placeholder function and declare an
> external function of the same name and arguments.

With this approach(*), isn't it enough "switching" the placeholder
function and the real one [whenever that's the case], simply declaring
them with a unique name? You'd implement even the simple one as usual
in the external module, and everything should run smooth...

ciao, lele.

(*) I assume you are considering dependencies and the such...
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele@... | -- Fortunato Depero, 1929.