$ curl cheat.sh/
--  Use the `psql` command `\l` to see which databases exist.
--  
--  I would expect database `foobar` to not exist.
--  
--  That would mean that the `CREATE DATABASE` statement has failed.
--  Can you get the error message for that?
--  
--  My suspicion is that creating the database failed because you were
--  still connected to the template database `foo`. You can only use a
--  database with no active connections as template.
--  
--  [Laurenz Albe] [so/q/46459324] [cc by-sa 3.0]

$
Follow @igor_chubin cheat.sh