SELECT * FROM tbl WHERE id = ANY($1) ORDER BY array_position($1, id);
Created
December 10, 2018 13:06
-
-
Save mikeifomin/95dd757d8ccab8f43619350f6b0247a7 to your computer and use it in GitHub Desktop.
Postgres select IN order (great for GraphQL loaders)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment