I have a function called strip_tags defined in postgreSQL which strips out HTML tags in a given string.(I know trying to strip out html tags at db level is frowned upon, but i have to do this).
I want to extract some news from my db therefore I am executing a query:
SELECT description FROM news WHERE description ilike '%apple%'
Data in the description column is a mixture of html and text and i want to strip the html and then search if it matches '%apple%' or not! somewhat like:
SELECT description FROM news WHERE (select strip_tags(description)) ilike '%apple%'
Is this possible in postgreSQL? I tried executing this query but it dint work!