FirebirdSQL / firebird-documentation

Firebird documentation
https://www.firebirdsql.org/en/firebird-rdbms/
34 stars 14 forks source link

[FB4] Description of RDB$FUNCTION_ARGUMENTS::RDB$MECHANISM #192

Closed dmitry-lipetsk closed 10 months ago

dmitry-lipetsk commented 10 months ago

This column can also contain the following values:

mrotteveel commented 10 months ago

Thanks, I'll add it when I have time.

mrotteveel commented 10 months ago

BTW: Is this only for Firebird 4+ or also for older versions?

dmitry-lipetsk commented 10 months ago

These constants were added in FB v2.0, if I understand correctly.

FB2 source (types.h):

    TYPE("BY_VALUE", 0, nam_mechanism)
    TYPE("BY_REFERENCE", 1, nam_mechanism)
    TYPE("BY_VMS_DESCRIPTOR", 2, nam_mechanism)
    TYPE("BY_ISC_DESCRIPTOR", 3, nam_mechanism)
    TYPE("BY_SCALAR_ARRAY_DESCRIPTOR", 4, nam_mechanism)
    TYPE("BY_REFERENCE_WITH_NULL", 5, nam_mechanism)

FB1.5.4.4910 source (types.h):

    TYPE("BY_VALUE", 0, nam_mechanism)
    TYPE("BY_REFERENCE", 1, nam_mechanism)
    TYPE("BY_VMS_DESCRIPTOR", 2, nam_mechanism)
    TYPE("BY_ISC_DESCRIPTOR", 3, nam_mechanism)
    TYPE("BY_SCALAR_ARRAY_DESCRIPTOR", 4, nam_mechanism)

Although FB1.5 has SCALAR_ARRAY-constant, it does not support the creation of UDF with such arguments (I tested this):

image

mrotteveel commented 10 months ago

Given the language references only start at 2.5, the behaviour for Firebird 1.5 is not important :)

dmitry-lipetsk commented 10 months ago

Ok :)

mrotteveel commented 10 months ago

Added to fblangref25 - fblangref50; this will be published at a later time (hoping/waiting for more changes to accumulate).