Site down right now? Call or text, and I'll start the same day. (910) 338-4964
Randy Johnson
← All posts

How to create a database in PostgreSQL

Today I needed to create a database with SQL_ASCII encoding. Here is the command I used: CREATE DATABASE MyDB ENCODING 'SQL_ASCII' TEMPLATE template0; I had to use template0 because template1 was set to UTF8. I still need to dig in on the templ...

Today I needed to create a database with SQL_ASCII encoding.

Here is the command I used:

CREATE DATABASE MyDB ENCODING 'SQL_ASCII' TEMPLATE template0;

I had to use template0 because template1 was set to UTF8.

I still need to dig in on the templates and what they are all about.

More posts