How to create Postgres database containing dot in it's name?

Viewed 1290

I am trying to create the Postgres database using the terminal,

Normally we can create the database like

CREATE DATABASE mydatabase;

but I wanted to create with the database with a dot. like

CREATE DATABASE my.database;

I was trying to escape the characters. but it doesn't work

CREATE DATABASE my.\database;

CREATE DATABASE my\.database;

as an expected output, it should create the database named my.database

1 Answers

you should create the database using

create database "my.database";

Related