Re: Temporary tables - Mailing list pgsql-sql

From George A.J
Subject Re: Temporary tables
Date
Msg-id 20031001031740.66479.qmail@web14901.mail.yahoo.com
Whole thread Raw
In response to Re: Temporary tables  ("vijaykumar M" <m_vijaykumar@hotmail.com>)
List pgsql-sql

Thanks to all of you for your suggestions. the problem is solved by creating a function

istableexist() that returns whether a table exist or not. the function is bellow.


CREATE FUNCTION istableexist(varchar) RETURNS bool AS '

 DECLARE

 BEGIN

     /* check the table exist in database and is visible*/
     PERFORM relname,relnamespace FROM pg_class
            WHERE relkind = ''r''
                  AND Upper(relname) = Upper($1)
                  AND pg_table_is_visible(oid);

     IF FOUND THEN
        RETURN TRUE;
     ELSE
        RETURN FALSE;
     END IF;
  
 END;'
 LANGUAGE 'plpgsql';

thanks again

jinujose


Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

pgsql-sql by date:

Previous
From: "Suresh Basandra"
Date:
Subject: Re: insert error
Next
From: "Rute Solipa"
Date:
Subject: Unsubscribe