Guest User

Untitled

a guest
Mar 18th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. CREATE OR REPLACE FUNCTION remove_words(message text) RETURNS SETOF text AS $$
  2. BEGIN
  3. RETURN QUERY select * from regexp_split_to_table(message, E'\\s+') except select boring_words.word from boring_words where boring_words.word = ANY(regexp_split_to_array(message, E'\\s+'));
  4. END;
  5. $$ LANGUAGE plpgsql;
Add Comment
Please, Sign In to add comment