Re: temp table existence

From: aklaver(at)comcast(dot)net (Adrian Klaver)
To: "Marcin Krawczyk" <jankes(dot)mk(at)gmail(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: temp table existence
Date: 2007-12-29 22:25:23
Message-ID: 122920072225.1629.4776C95300035CAA0000065D22007456729D0A900E04050E@comcast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

------------- Original message ----------------------
From: "Marcin Krawczyk" <jankes(dot)mk(at)gmail(dot)com>
> Hi all. Is there a way to determine the existence of a TEMP
> TABLE? I need to check i it exists before I create it. Doing simple
> check on pg_class or pg_tables is
> not enough because there may be other such tables created in other sessions.
> Or maybe anyone knows the identification (apart from 'others') of error to
> trap it with EXCEPTION clause?

select * from temp_table limit 1;
Trap error 42P01 Undefined table.

--
Adrian Klaver
aklaver(at)comcast(dot)net

-

Browse pgsql-sql by date

  From Date Subject
Next Message Erik Jones 2007-12-30 06:26:08 Re: temp table existence
Previous Message Pavel Stehule 2007-12-29 21:23:51 Re: temp table existence