Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
joppy
· 5y ago · 0 comments
Arrays are nicer for the IN case because Postgres does not understand an empty list, i.e “WHERE foo IN ()” will error. Using the “WHERE foo = ANY(array)” works as expected with empty arrays.
Comments
[–]
grantwu
5y ago
Works as expected? Wouldn't that WHERE clause filter out all of the rows? Is that frequently desired behavior?
[–]
ethanpailes
5y ago
I could imagine that you're building up the array in go code and want the empty set to be handled as expected.