Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
joppy
on Sept 8, 2021
|
parent
|
context
|
favorite
| on:
How We Went All In on sqlc/pgx for Postgres and Go
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.
grantwu
on Sept 8, 2021
[–]
Works as expected? Wouldn't that WHERE clause filter out all of the rows? Is that frequently desired behavior?
ethanpailes
on Sept 9, 2021
|
parent
[–]
I could imagine that you're building up the array in go code and want the empty set to be handled as expected.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: