title: Is it possible to create PostgreSQL Databases with dynamic names with the help of Golang?
body: <p>I use Go on my backend. I try to write a function which takes database name and creates PostgreSQL Database with this name. After this function should create tables in this DB (I have already created an sql script for this task)</p>
  
  <p>So the main problem is that I don't understand how to write a function which will create a PostgreSQL Database. I had a thought to create one .sql file and somehow pass database name to this file (for example find string in .sql file, which looks like {{dbname}} and replace it with db name), but may be there is a better way?</p>
  
  <p>Here is my .sql file which should create tables in new PostgreSQL Database </p>
  
  <pre><code>create table "reviews"
  (
    review_id  uuid  not null
      constraint review_pk
        primary key,
    user_id  uuid  not null,
    rating  float,
    comment text,
    date  date  not null
  );
  
  create unique index reviews_review_id_uindex
    on "reviews" (review_id);
  
  create unique index reviews_user_id_uindex
    on "reviews" (user_id);
  
  create table "sections"
  (
    section_id  uuid  not null
      constraint section_pk
        primary key,
    title  text  not null,
    color  text,
    created_at date not null,
    updated_at  date  not null,
    deleted boolean default false
  );
  
  create unique index sections_section_id_uindex
    on "sections" (section_id);
  </code></pre>