Skip to content

Please remove the STRICT marking from the to_array(icollection, anyelement) function #45

Description

@M-Butter

Describe the problem

  • What are you trying to solve?
    Without STRICT in the function definition of to_array(icollection, anyelement), I would be able to pass a null argument with the right type to obtain a correctly typed array from the icollection.
    Especially when a complex composite type is stored in the icollection, then that would save me the effort to construct a dummy instance of that complex composite type just to tell the to_array function what type I need.

Describe the proposal

  • What is the feature you are proposing?
    Remove the STRICT marking from function to_array(icollection, anyelement) to allow the second argument to be a typed NULL value.

  • How would it solve the problem?
    No (complex) constructor is needed for an element that is used just ot get the right type in the second argument.

Describe alternatives

  • How would you solve the problem today if the feature is not built?
    Create an object with the right element type to pass as second argument for the to_array(icollection, anyelement) function.

  • What other alternatives are there?
    There are several, but all to the cost of more code and less performance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions