pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mike Papper <m.papper@fantastic.com>
To: pgsql-sql@postgresql.org
Subject: Finding if a temp table exists in the current connection
Date: Wed, 02 Apr 2003 00:09:33 -0800
Message-ID: <b6ff90$24ap$1@news.hub.org> (raw)

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




view thread (3+ messages)  latest in thread

Message-ID: <b6ff90$24ap$1@news.hub.org>
Permalink:  ../b6ff90$24ap$1@news.hub.org/
Also on:    postgresql.org/message-id/b6ff90$24ap$1@news.hub.org

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: m.papper@fantastic.com
  Subject: Re: Finding if a temp table exists in the current connection
  In-Reply-To: <b6ff90$24ap$1@news.hub.org>

* 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