I'm trying to create a PostgreSQL database using the npgsql library, but the database name always ends up in lower case. Is it possible to preserve the case or should I just lower case everything? I want the database name to be MyDatabase, but it always ends up as mydatabase.
string server = "localhost";
string database = "MyDatabase";
string connectionString = @"Server=" + server + ";User Id=postgres";
var connection = new NpgsqlConnection(connectionString);
string commandText = "CREATE DATABASE " + database;
var command = new NpgsqlCommand(commandText);
connection.Open();
command.Connection = connection;
command.ExecuteNonQuery();
connection.Close();