Received: from jupiter.hub.org (jupiter.hub.org [64.49.215.5]) by postgresql.org (Postfix) with ESMTP id 2EFCE475F1C for ; Fri, 8 Mar 2002 14:34:51 -0500 (EST) Received: (from news@localhost) by jupiter.hub.org (8.11.6/8.11.6) id g28JDx320241 for pgsql-general@postgresql.org; Fri, 8 Mar 2002 13:13:59 -0600 (CST) (envelope-from news) From: mdb002@yahoo.com (mdb) X-Newsgroups: comp.databases.postgresql.questions Subject: Re: Temp Tables Date: 8 Mar 2002 11:13:42 -0800 Organization: http://groups.google.com/ Lines: 28 Message-ID: <9e6ea67a.0203081113.4da58f6e@posting.google.com> References: <9e6ea67a.0203041248.24859ff2@posting.google.com> <9e6ea67a.0203080645.6e390f02@posting.google.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: groups-abuse@google.com To: pgsql-general@postgresql.org X-Archive-Number: 200203/649 X-Sequence-Number: 22023 The problem was the name of the temp table. When I created the view inside a stored procedure the view was created "normally" and could be referenced by the name I gave it. The temp tables can not be referenced by the name I gave them. VB/ODBC did not produce an error when I tried to open a recordset with the temp table name I used (ex. table does not exist) it just did not open the recordset and continued on. A little misleading. I did find a work around posted by Richard Huxton/Bruce Momjian - CREATE FUNCTION getpid () returns int4 as '/lib/libc.so.6' LANGUAGE 'C'; This returns the process id. The temp table named uses the process id (pg_temp.PROCESS_ID.TEMP_TABLE_NUMBER) using the returned process id and a counter in the VB program (the temp table is destroyed and created multiple times) I was able to select using PostgreSQL generated name. Thank You to all that responded. Bruce, Tom and everyone else involved with PostgreSQL, This is my first experience with your database, despite a learning curve I am going through right now I am throughly impressed with Postgre. It is an awesome database. Marc