SQL query where id=… or id=… or id=… etc I haven't had much experience with postgresql (none) and I am wondering/hoping that there is a better way for me to do this query.

SELECT * FROM member_copy WHERE id = 17579 OR id = 17580 OR id = 17582 ect.


There are about 800 where clauses in total so this will take a while and I need to run it on a fairly regular basis.
The way to write that query is:

SELECT * FROM member_copy WHERE id IN (17579, 17580, 17582);


However, the real question is, where did that list of ids come from?  If the list of ids is the result of another database query, then you should be doing either a subselect or a join instead.