What is a valid PostgreSQL database name?
postgresql
Solution
The documentation you asked about is here:
http://www.postgresql.org/docs/current/interactive/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS
Most people just stick to lowercase letters, numeric digits, and underscores -- to avoid typing the quotes all the time.
Problem
I create a database with a hyphen in the middle of the name with `createdb`. That successfully creates the database, but within the `psql` interactive client, I get a syntax error if I try a command like this: ` ALTER DATABASE my-database SET SCHEMA = myschema,public; ` `psql` complains of a syntax error at or near "-" Is there some documentation for what counts as a valid PostgreSQL database name? Should I just underscores instead of hyphens?