| From: | José Soares <jose(at)sferacarta(dot)com> |
|---|---|
| To: | "Brett W(dot) McCoy" <bmccoy(at)lan2wan(dot)com> |
| Cc: | pgsql-interfaces(at)postgresql(dot)org |
| Subject: | Re: [INTERFACES] Detecting existance of table |
| Date: | 1999-04-22 12:02:09 |
| Message-ID: | 371F0FC1.DF690C47@sferacarta.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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?
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Per Rønne | 1999-04-22 13:53:16 | RE: [INTERFACES] Possible error in libpg++ interface, date[time] fields. |
| Previous Message | Per Rønne | 1999-04-22 09:35:18 | RE: [INTERFACES] Possible error in libpg++ interface, date[time] fields. |