Re: How to drop automatically some databases?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday, April 25, 2015, Andreas <maps.on@xxxxxxx> 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. 

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux