Y
Hacker News
new
|
ask
|
show
|
jobs
by
joppy
1740 days ago
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.
1 comments
grantwu
1740 days ago
Works as expected? Wouldn't that WHERE clause filter out all of the rows? Is that frequently desired behavior?
link
ethanpailes
1740 days ago
I could imagine that you're building up the array in go code and want the empty set to be handled as expected.
link