BEGIN;

CREATE OR REPLACE FUNCTION odd_even(integer) RETURNS text AS $$
DECLARE
    num ALIAS FOR $1;
    ret text;
BEGIN
    IF num % 2 = 0 THEN
        ret := '偶数';
    ELSE
        ret := '奇数';
    END IF;
    RETURN ret;
END;
$$ LANGUAGE plpgsql;

COMMIT;
