I am using a set of SQL LIKE conditions to go through the alphabet and list all items beginning with the appropriate letter, e.g. to get all books where the title starts wit
Assuming that you're looking for "numbers that start with 7" rather than "strings that start with 7," maybe something like
select * from books where convert(char(32), book_id) like '7%'
Or whatever the Postgres equivalent of convert is.