From: rickd@open-works.com
To: pgsql-sql@postgresql.org
Subject: Conditional test
Date: 27 Dec 2001 18:54:30 -0800
Message-ID: <4eee2f8d.0112271854.276c1152@posting.google.com> (raw)
I am trying to solve this problem:
If a table exists, drop the table, otherwise continue processing.
For example, if table X exists, then drop table X. How would I do
this in SQL? I can query the pg_tables table to see which tables
exist, but I'm looking for an If-Else construct in SQL.
Thanks in advance,
Rick
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: rickd@open-works.com
Subject: Re: Conditional test
In-Reply-To: <4eee2f8d.0112271854.276c1152@posting.google.com>
* 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