------------- Original message ----------------------
From: "Marcin Krawczyk" <[EMAIL PROTECTED]>
> 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
[EMAIL PROTECTED]

 -

--- Begin Message --- 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?

--- End Message ---
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to