|Subject||Re: [firebird-support] Using PSQL as a function?|
> I checked the FB Book but can't see anything obvious.PSQL-based stored functions are implemented for V3, which is in Alpha
> Is it possible to use PSQL procedures as functions in SQL? Assuming the
> procedure only returns one value, and it's type matches as required,
> something like:
> SELECT VAL, MY_PSQL_PROC(VAL) FROM SOME_TABLE;
> SELECT * FROM SOME_TABLE WHERE VAL = MY_PSQL_PROC(123);
> It seems like a useful feature but the only way to do that currently is
> via external C modules.
state at the moment, thus not ready for production.
For pre V3, you can use a selectable stored procedure in something
called inline select:
, (select rvalue from my_psql_proc(t.c1)) as proc_value
Professional Tools and Services for Firebird
FB TraceManager, IB LogManager, Database Health Check, Tuning etc.