Skip site navigation (1) Skip section navigation (2)

Re: Temp table exists test??

From: Michael Guerin <guerin(at)rentec(dot)com>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Temp table exists test??
Date: 2005-02-04 04:16:51
Message-ID: 4202F733.8040600@rentec.com (view raw or flat)
Thread:
Lists: 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


In response to

pgsql-novice by date

Next:From: John DeSoiDate: 2005-02-04 07:02:19
Subject: Re: Installation tool
Previous:From: Michael GuerinDate: 2005-02-04 04:10:40
Subject: Re: Temp table exists test??

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group