I have a problem where I need to restrict queries by more than a million ids that are the result of another program. Typically I would in the application layer write those ids into an IN( ) clause, but that will not work for more than 10,000 ids. So I need to load these ids into the db into some structure that I can call/join in the other queries. I have a I amd considering a temporary solution where a table is loaded with the nessesary ids for restricting the queries. I would really like something more efficent. In oracle I know I can create a variable of type table and fill it with these ids and then write my queries to use this table. How can I do this in postgresql, I did not see any support for a type table. Anyone know of any good tutorials or how-tos for doing this type of stuff in postgresql? Thanks - Jeff ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly