Re: How to check if a table exists - Mailing list pgsql-general

From Tim Barnard
Subject Re: How to check if a table exists
Date
Msg-id 008001c0a7eb$13357ec0$a519af3f@hartcomm.com
Whole thread Raw
In response to How to check if a table exists  ("Jeff" <jklcom@mindspring.com>)
List pgsql-general
I do it this way using libpq: select count(*) from pg_class where
relname='table name goes here'
and test for a count > 1.

Tim

----- Original Message -----
From: "Jeff" <jklcom@mindspring.com>
To: <pgsql-general@postgresql.org>
Sent: Wednesday, March 07, 2001 8:48 PM
Subject: [GENERAL] How to check if a table exists


> Also how to programmatically check if a table exists in the database?
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Escaping underscores in LIKE
Next
From: Tom Lane
Date:
Subject: Re: length of insert stmt?