79255501

Date: 2024-12-05 16:35:49
Score: 1
Natty:
Report link

I had today the same issue and a syntax like this:

SELECT type from types where id = ANY (SELECT type_ids from user where id=1)  

Also doesn't work for me.

I read the documentation and it seem like the ANY expression want to have a list inside the parameter.

Also i found that the unnest method would convert the array to such a list.

I tried and for me this works really well, so to keep in your example it would be:

SELECT type from types where id = ANY (SELECT unnest(type_ids) from user where id=1)  

Reasons:
  • RegEx Blacklisted phrase (2): doesn't work for me
  • Long answer (-0.5):
  • Has code block (-0.5):
Posted by: snap