From: Julester <cubalibr@optonline.net>
To: pgsql-sql@postgresql.org
Subject: Checking for table existence
Date: Fri, 14 Sep 2001 18:58:29 GMT
Message-ID: <prso7.50245$f7.6232115@news02.optonline.net> (raw)
Hi everyone. In my old SQL Server days, I used a command such as "IF
exists(select name from sys_objects where name = 'xyztable')" to check if a
table existed before creating it with a standard CREATE command. I looked
in the PostgreSQL documentation, but for the life of me, I can't find an
equivalent. I can view if the table exists by doing a select against the
meta-data tables, but what about the IF statement ? Any help would be
greatly appreciated. Thanks.
Julester
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: cubalibr@optonline.net
Subject: Re: Checking for table existence
In-Reply-To: <prso7.50245$f7.6232115@news02.optonline.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox