Skip to content

Unable to determine return type for function ArrayFill  #6779

@izveigor

Description

@izveigor

Describe the bug

ArrayFill function can return lists with different dimensions:

postgres=# select array_fill(a, b) from fills;
            array_fill             
-----------------------------------
 {{2,2}}
 {5,5,5,5,5,5,5}
 {{{{1}}}}
 {{4,4,4},{4,4,4},{4,4,4},{4,4,4}}
(4 rows)

The standard return_type function cannot determine the type for 'dynamic' functions. because it prefers to assign one type to the whole column and does not take into account their arguments.

To Reproduce

No response

Expected behavior

No response

Additional context

About array_fill function: https://www.postgresql.org/docs/current/functions-array.html.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions