Skip to content

Custom ENUM in WHERE with IN comparision block #1439

Answered by teror4uks
teror4uks asked this question in Q&A
Discussion options

You must be logged in to vote

well, it seems I've found some solution/workaround:

if convert values to array of strings and then to array of product__enum values and compare with ANY() function...

SELECT SUM(price)
FROM sales
WHERE product = ANY(string_to_array($1, ',')::product__enum[])

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by teror4uks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant