From: mdb002@yahoo.com
To: pgsql-general@postgresql.org
Subject: Re: Temp Tables
Date: 8 Mar 2002 11:13:42 -0800
Message-ID: <9e6ea67a.0203081113.4da58f6e@posting.google.com> (raw)
References: <9e6ea67a.0203041248.24859ff2@posting.google.com>
<a03059a3.0203071416.7bf79d27@posting.google.com>
<9e6ea67a.0203080645.6e390f02@posting.google.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: mdb002@yahoo.com
Subject: Re: Temp Tables
In-Reply-To: <9e6ea67a.0203081113.4da58f6e@posting.google.com>
References: <9e6ea67a.0203041248.24859ff2@posting.google.com> <a03059a3.0203071416.7bf79d27@posting.google.com> <9e6ea67a.0203080645.6e390f02@posting.google.com> <9e6ea67a.0203081113.4da58f6e@posting.google.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox