| From: | "Tim Barnard" <tbarnard(at)povn(dot)com> |
|---|---|
| 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 16:16:04 |
| Message-ID: | 008001c0a7eb$13357ec0$a519af3f@hartcomm.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(at)mindspring(dot)com>
To: <pgsql-general(at)postgresql(dot)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(at)postgresql(dot)org)
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tim Barnard | 2001-03-08 16:51:24 | Re: How to check if a table exists |
| Previous Message | Tom Lane | 2001-03-08 15:49:51 | Re: length of insert stmt? |