EXTFNAPIV4_DESCRIBE_PARM_WIDTH Attribute (Set)

The EXTFNAPIV4_DESCRIBE_PARM_WIDTH attribute indicates the width of a parameter. Used in a describe_parameter_set scenario.

Data Type

a_sql_uint32

Description

The width of a parameter to a UDF. EXTFNAPIV4_DESCRIBE_PARM_WIDTH applies only to scalar parameters. Parameter width is the amount of storage, in bytes, required to store a parameter of the associated data type.

Usage

This is a read-only property. The width is derived from the associated column data type. Once the data type is set, you cannot change the width.

Returns

On success, returns the sizeof(a_sql_uint32).

On failure, returns one of the generic describe_parameter errors or:
  • EXTFNAPIV4_DESCRIBE_INVALID_STATE – set error returned if the query processing state is not equal to Annotation.
  • EXTFNAPIV4_DESCRIBE_BUFFER_SIZE_MISMATCH – set error returned if the describe_buffer is not the size of a_sql_uint32.
  • EXTFNAPIV4_DESCRIBE_INVALID_PARAMETER – set error returned if the specified parameter is a TABLE parameter. This includes parameter 0, or parameter n, where n is an input table.
  • EXTFNAPI4_DESCRIBE_INVALID_ATTRIBUTE_VALUE – set error returned if the UDF tries to reset the parameter width.

Query Processing States

Valid in:
  • Annotation state
Related concepts
Query Processing States
Related reference
EXTFNAPIV4_DESCRIBE_PARM_WIDTH Attribute (Get)
Generic describe_parameter Errors