Re: Temp table exists test?? - Mailing list pgsql-novice

From Michael Guerin
Subject Re: Temp table exists test??
Date
Msg-id 4202F733.8040600@rentec.com
Whole thread Raw
In response to Re: Temp table exists test??  (Michael Fuhr <mike@fuhr.org>)
List pgsql-novice
>If you don't care whether the table is temporary or not then you
>could simply test if it's visible:
>
>SELECT *
>FROM pg_class
>WHERE relname = 'foo'
>  AND relkind = 'r'
>  AND pg_table_is_visible(oid);
>
>
>
Ignore my last post that pg_table_is_visible didn't work, I created the
table but forgot the keyword temp :(  .. Guess its time for me to goto bed.

This is exactly what I'm looking for.

Thanks
Michael


pgsql-novice by date:

Previous
From: Michael Guerin
Date:
Subject: Re: Temp table exists test??
Next
From: Bruce Rowe
Date:
Subject: Installation tool