Re: Check if table exists

From: "Guy Rouillier" <guyr(at)masergy(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Check if table exists
Date: 2004-12-17 22:32:17
Message-ID: CC1CF380F4D70844B01D45982E671B2348E4CC@mtxexch01.add0.masergy.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

ON.KG wrote:
> Hi ALL!
>
> I need to check before selection records from table - does this table
> exist How can i do that?

One thing to consider: you are making a trip to the database to
determine if a table exists. If it exists, you are then making another
trip to the database to get rows from it. For a non-destructive
operation (i.e., select), you may be better off just doing the select,
and watching for a "table does not exist" error.

--
Guy Rouillier

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-12-17 22:40:48 Re: OSX 10.3.7 broke Postgresql 8.0.0b5?
Previous Message Tom Lane 2004-12-17 22:26:25 Re: MD5(MD5(pw)) OK?