I am working on AWS server + PostgreSQL. When I execute a query for creating the database I get an error:
CREATE DATABASE cannot run inside a transaction blo
I have used turn on autocommit in PostgreSQL and it's working for me.
Here is the query to turn on the autocommit
SET AUTOCOMMIT = ON
Note that this only works for PostgreSQL 9.4 and below