Skip to content

create_function migration helper needs "language" and "immutable" options #1120

@jwoertink

Description

@jwoertink

def create_function(name : String, body : String, returns : String = "trigger")

When creating a new function you may want to specify the language the function uses or if the function is immutable.

CREATE OR REPLACE FUNCTION public.some_function(thing boolean)
         RETURNS boolean
         LANGUAGE plpgsql
         IMMUTABLE
AS $$
BEGIN
....
END
$$

For defaults we could use "VOLATILE" for immutable and sql for the language.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions