What would be equivalent of this in postgresql
run('echo "CREATE DATABASE %s;"|mysql --batch --user=%s --password=%s --host=%s' % (dataname, env.mysqluser, env.mysqlpassword, env.mysqlhost), pty=True)
The above works fine for creating mysql database, but how would you create one in postgresql without getting stuck at password prompt.