Subject feature request
Author Holger Klemt
in a customer project we are also working with an ibm as400 and they have a
feature there, which could be hopefully easy to implement in firebird:

in simple words:

declare a udf to use a stored procedure
use any stored procedure as a function

for example when i have a simple select on a stored procedure, it
works in firebird like

select * from stored_proc(param1)

the idea is to use the procedure similar to a udf, for example

select sales.*, sp_customer_caption(id_customer) from sales

as far as i have tested this, it does not work until now, but it would be
helpful, especially to avoid a lot of tables used in one select, which
makes problems in the optimizer (a udf only used in the field list does not
make changes to the optimizers plan).

We use a function which gives us a caption for a foreign key field without
adding the foreign table to the select. since the procedure only gives one
record back and has one input and one output param, it is really easy to
optimize and give a flexible functionality, because currently i see no
way to use table data in a udf.

See you on First European Firebird Conference in May in Fulda, Germany

IBExpert - The most Expert for InterBase and Firebird ---
HK Software - Holger Klemt - Huntestrasse 15 - D-26135 Oldenburg
Telefon Telefax +49 700 IBEXPERT (42397378)
Schulungen - Projektunterst´┐Żtzung - Delphi - InterBase - AS/400