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?
question from:
https://stackoverflow.com/questions/10216784/what-is-a-valid-postgresql-database-name 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…