Received: from bologna.nettuno.it (bologna.nettuno.it [193.43.2.1]) by hub.org (8.9.3/8.9.1) with ESMTP id IAA49509 for ; Thu, 22 Apr 1999 08:07:23 -0400 (EDT) (envelope-from jose@sferacarta.com) Received: from proxy.sferacarta.com (mail@sfcabop1.nettuno.it [193.207.10.213]) by bologna.nettuno.it (8.8.6/8.8.6/NETTuno 3.1) with ESMTP id OAA21486; Thu, 22 Apr 1999 14:07:10 +0200 (MDT) Received: from rosso.sferacarta.com (sferacarta.com) [10.20.30.5] by proxy.sferacarta.com with esmtp (Exim 2.05 #1 (Debian)) id 10aK3k-0000n1-00; Thu, 22 Apr 1999 14:02:32 +0000 Message-ID: <371F0FC1.DF690C47@sferacarta.com> Date: Thu, 22 Apr 1999 14:02:09 +0200 From: =?iso-8859-1?Q?Jos=E9?= Soares X-Mailer: Mozilla 4.5 [it] (Win95; I) X-Accept-Language: it MIME-Version: 1.0 To: "Brett W. McCoy" CC: pgsql-interfaces@postgresql.org Subject: Re: [INTERFACES] Detecting existance of table References: Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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?