pg>oracle>regexp_like
2021-09-24 11:06:16    82    0    0
ivan

    CREATE OR REPLACE FUNCTION public.regexp_like(p1 text, p2 text)
    RETURNS boolean
    LANGUAGE plpgsql
    AS $function$
        DECLARE
            v_return boolean := FALSE;
        BEGIN
            IF (regexp_match(p1, p2) IS NOT NULL) THEN
                v_return := TRUE;
            END IF;
            RETURN v_return;
        END;

    $function$ ;

 

    CREATE OR REPLACE FUNCTION public.regexp_like(p1 text, p2 text, p3 text)
    RETURNS boolean
    LANGUAGE plpgsql
    AS $function$
        DECLARE
            v_return boolean := FALSE;
        BEGIN
            IF (regexp_match(p1, p2, p3) IS NOT NULL) THEN
                v_return := TRUE;
            END IF;
            RETURN v_return;
        END;
    $function$ ;

Pre: pg>bytea存储文件

Next: 塔尔寺

82
Sign in to leave a comment.
No Leanote account? Sign up now.
0 comments
Table of content