Finding if a temp table exists in the current connection

From: Mike Papper <m(dot)papper(at)fantastic(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Finding if a temp table exists in the current connection
Date: 2003-04-02 08:09:33
Message-ID: b6ff90$24ap$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Is there a way (i.e., access theinternal pg_ tables) to find out if a
particular temp table already exists (in the current connection)?

I have written some stored procedures that check if a table exists and if a
column exists in a table. This is used so I can perform upgrades of our
system (if table doesnt exist, call create table... sql).

I would like to do a similar thing for temp tables.

I have noticed that if another connection creates a temp table, it will
show up in the pg_* tables so that all ocnnections can see the table.

Is there some standard SQL way to test?

--
Mike Papper

Browse pgsql-sql by date

  From Date Subject
Next Message AndreT 2003-04-02 10:53:52 string variable with spaces in psql
Previous Message Joe Conway 2003-04-02 06:26:10 Re: Rows as Columns