Re: [INTERFACES] Detecting existance of table - Mailing list pgsql-interfaces

From José Soares
Subject Re: [INTERFACES] Detecting existance of table
Date
Msg-id 371F0FC1.DF690C47@sferacarta.com
Whole thread Raw
In response to Detecting existance of table  ("Brett W. McCoy" <bmccoy@lan2wan.com>)
List pgsql-interfaces
Try this:
 select TRUE from pg_class where relname = 'my_table' and relkind = 'r';

José


"Brett W. McCoy" ha scritto:

> Is there a way of detecting the existance of a table via a function call?
> I'm trying to implement a 'saved search' feature in a search engine, and
> need to query a database to see if a particular table exists without
> throwing an error.  Actually, can an exception be caught somehow?  I'm
> mainly doing this with PHP3, but I also need to do it via the Perl Pg.pm
>
> Brett W. McCoy
>                                          http://www.lan2wan.com/~bmccoy
> -----------------------------------------------------------------------
> Why is the alphabet in that order?  Is it because of that song?


pgsql-interfaces by date:

Previous
From: Per Rønne
Date:
Subject: RE: [INTERFACES] Possible error in libpg++ interface, date[time] fields.
Next
From: Per Rønne
Date:
Subject: RE: [INTERFACES] Possible error in libpg++ interface, date[time] fields.