Re: How to check if a table exists

From: Ben Leslie <benno(at)sesgroup(dot)net>
To: Jeff <jklcom(at)mindspring(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to check if a table exists
Date: 2001-03-08 05:17:09
Message-ID: 20010308161709.A2682@sesgroup.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 07 Mar 2001, Jeff wrote:

> Also how to programmatically check if a table exists in the database?

I think the easiest way is to attach to one of the default database like
"Template0" i think, then query the system tables. pg_database and
pg_class are theones you will be after i think.

(Well that how I've done it.. there is probably a better way ;)

Cheers,

Benno

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jan Wieck 2001-03-08 06:54:26 Re: triggers vs. 'NEW in non-rule query' -- SOLVED?
Previous Message Jeff 2001-03-08 04:48:54 How to check if a table exists