allow hyphens in database name

This commit is contained in:
Jeff Rescignano 2024-12-11 13:01:29 -05:00
parent c206eb38a8
commit 2fe5f1ceb1
No known key found for this signature in database
GPG Key ID: 84729D08F891C662
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ import (
var (
alphaNumericRegexp = regexp.MustCompile("^[a-zA-Z][a-zA-Z0-9]*$")
databaseNameRegexp = regexp.MustCompile("^[a-zA-Z_][a-zA-Z0-9_]*$")
databaseNameRegexp = regexp.MustCompile("^[a-zA-Z_][a-zA-Z0-9_-]*$")
userRegexp = regexp.MustCompile(`^[a-z0-9]([-_a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-_a-z0-9]*[a-z0-9])?)*$`)
patroniObjectSuffixes = []string{"leader", "config", "sync", "failover"}
finalizerName = "postgres-operator.acid.zalan.do"