A crude way would be to put it in a block and ignore the exception

BEGIN
       -- create temp table
   EXCEPTION
       WHEN DUPLICATE_TABLE THEN
           -- Table already exists,
           NULL;
   END;

thx
- Amol

Szymon Guz wrote:
I want to create a temp table in a trigger... but this must be created max once for each transaction. I'd like to check in the trigger if the table exists. How can I check if a table is a temporary table?

regards
Szymon Guz


--
Sent via pgsql-general mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to