I am working with some software that creates a lot of temporary tables to store query returns. So after a few weeks I have over 200 tables named tmp_123_some_number_etc . Is there a way from psql for me to drop all the tables with names beginning with tmp_ ? Thanks -- Danny Aldham Providing Certified Internetworking Solutions to Business www.postino.com E-Mail, Web Servers, Web Databases, SQL PHP & Perl
Danny Aldham <danny@lennon.postino.com> writes:
> I am working with some software that creates a lot of temporary tables
> to store query returns. So after a few weeks I have over 200 tables
> named tmp_123_some_number_etc . Is there a way from psql for me to
> drop all the tables with names beginning with tmp_ ?
Why don't you make it create the tables as TEMP tables to begin with?
Then they'll go away by themselves.
regards, tom lane
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера