Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE OR REPLACE FUNCTION remove_words(message text) RETURNS SETOF text AS $$
- BEGIN
- 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+'));
- END;
- $$ LANGUAGE plpgsql;
Add Comment
Please, Sign In to add comment