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.