Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE OR REPLACE FUNCTION GET_FILM (P_PATTERN VARCHAR)
- RETURNS TABLE (FILM_TITLE VARCHAR, FILM_RELEASE_YEAR INT)
- AS $$
- BEGIN
- RETURN QUERY
- SELECT title, CAST(release_year AS INTEGER)
- FROM
- film
- WHERE
- title ILIKE p_pattern;
- END;
- $$ LANGUAGE 'plpgsql';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement