Skip site navigation (1) Skip section navigation (2)

DROP TABLE wildcard

From: Andy Koch <dfunct(at)telus(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: DROP TABLE wildcard
Date: 2001-05-02 19:52:57
Message-ID: 5.1.0.14.0.20010502124732.0241fbd0@pop.telus.net (view raw or flat)
Thread:
Lists: pgsql-general
Is it possible to drop multiple tables with SQL on the system tables:

I tried this:

DROP TABLE from pg_tables where tablename LIKE 'table_num_%';

Which for whatever reason would delete 0 items despite it should have 
matched on several.

Of course I'm not even sure pg_tables would be the smart place to make the 
delete from?

Thanks.


Responses

pgsql-general by date

Next:From: Christian MarschalekDate: 2001-05-02 19:53:26
Subject: Strange SERIAL / Sequence error
Previous:From: Doug McNaughtDate: 2001-05-02 19:38:06
Subject: Re: Re: Stranger than fiction - EXPLAIN results

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group