how to get list of databases that a user owns?
Posted
by chiggsy
on Stack Overflow
See other posts from Stack Overflow
or by chiggsy
Published on 2010-05-13T02:41:06Z
Indexed on
2010/05/13
2:44 UTC
Read the original article
Hit count: 279
postgresql
Id like to find out ( and delete ) all the databases owned by an owner in postgres 8.4.3 I'm new to postgres also, and although I can , and will , read the whole manual today i was forced to use
for i in $(psql -l |grep novicedba | awk '{print $1}')
psql -d postgres -c " drop database \"$i\""
out of desperation. What's the postgresql way to do this?
© Stack Overflow or respective owner