Re: How to drop automatically some databases?

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: How to drop automatically some databases?
Дата
Msg-id CAKFQuwaH847+9o-3=KHsdokP3t=YEJRpF3MSzL91axv0vZxEXA@mail.gmail.com
обсуждение исходный текст
Ответ на How to drop automatically some databases?  (Andreas <maps.on@gmx.net>)
Список pgsql-admin
On Saturday, April 25, 2015, Andreas <maps.on@gmx.net> wrote:
drop database ( ... the select above ... )

in the DB "postgres" but it didn't work.
After a couple of seconds I get a syntax error.

What now?   :}


You have to use dynamic sql - either using plpgsql so something in your client of choice (e.g. psql).  Drop database is DSL and does not accept database names as parameters or via column references.

David J. 

В списке pgsql-admin по дате отправления:

Предыдущее
От: Andreas
Дата:
Сообщение: How to drop automatically some databases?
Следующее
От: Andre_Mikulec
Дата:
Сообщение: How do I install/run PostgreSQL 9.4 64 bit on Windows 7 Professional?