Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f66GTUa52209 for ; Fri, 6 Jul 2001 12:29:30 -0400 (EDT) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id f66FkTL37718 for pgsql-sql@postgresql.org; Fri, 6 Jul 2001 11:46:29 -0400 (EDT) (envelope-from news) From: "Jeff Barrett" X-Newsgroups: comp.databases.postgresql.sql Subject: create type of table Date: Fri, 6 Jul 2001 11:41:10 -0400 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 17 Message-ID: <9i4mgl$14qj$1@news.tht.net> X-Complaints-To: scrappy@hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 To: pgsql-sql@postgresql.org X-Archive-Number: 200107/67 X-Sequence-Number: 3851 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