Skip to content
This repository was archived by the owner on Jun 23, 2025. It is now read-only.

set props only if defined #4

@pyramation

Description

@pyramation
CREATE FUNCTION ast.a_const (
      v_val jsonb DEFAULT NULL
  ) RETURNS jsonb AS $EOFCODE$
  DECLARE
      result jsonb = '{"A_Const":{}}'::jsonb;
  BEGIN
      result = ast.jsonb_set(result, '{A_Const, val}', v_val);
      RETURN result;
  END;
  $EOFCODE$ LANGUAGE plpgsql IMMUTABLE;

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