Advertisement
go6odn28

user_defined_function

Jun 25th, 2024 (edited)
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE OR REPLACE FUNCTION fn_is_word_comprised(
  2.     set_of_letters VARCHAR(50),
  3.     word VARCHAR (50)
  4. )
  5. RETURNS BOOLEAN AS
  6. $$
  7. BEGIN
  8.     RETURN TRIM(LOWER(word), LOWER(set_of_letters)) = '';
  9. END
  10. $$
  11. LANGUAGE plpgsql;
  12.  
  13. -- SELECT fn_is_word_comprised('ois tmiah%f', 'halves');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement