Skip to content

function exists #14

@stevemmarshall

Description

@stevemmarshall

Hi

This a nice package that I stumbled upon....

I want to check if a function exists and here's my code.. i thought it might be a namespace issue but also tried to_char and it failed... so maybe I'm doing something dumb..

CREATE OR REPLACE FUNCTION unit_tests.reformat_date_exists()
RETURNS test_result
AS
$$
DECLARE message test_result;
BEGIN
IF 1 = 1 THEN
SELECT assert.function_exists('reformat_date') INTO message;
RETURN message;
END IF;

SELECT assert.ok('End of test.') INTO message;  
RETURN message; 

END
$$
LANGUAGE plpgsql;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions