Skip to content

Many stdlib functions / operations can't get inlined by postgres #8677

@msullivan

Description

@msullivan

json -> scalar casts and array indexing are two culprits that showed up in some recent testing I've done, and together slowed a test down by about 2x.

The culprit seems to be this rule from https://wiki.postgresql.org/wiki/Inlining_of_SQL_functions:

  • if the function is declared IMMUTABLE, then the expression must not invoke any non-immutable function or operator

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions