"Philippe Lang" <philippe.lang@attiksystem.ch> writes:
> A small question here: solde_po is an SQL function (not PLPGSQL). Is it
> "inlined" in the parent query before the whole query execution plan is
> calculated?
You should be able to tell that by inspecting the filter conditions
in the ANALYZE output. Do you see solde_po(), or its innards?
(Or in other words: it depends, and you didn't give us sufficient
info to say.)
regards, tom lane