GAUSS-00501 -- GAUSS-00510
GAUSS-00501: “template database '%s' does not exist”
SQLSTATE: 3D000
Description: The template database template1 does not exist.
Solution: The template1 database is lost due to a database system exception. Restart the database or manually create the **template1 **database.
GAUSS-00502: “permission denied to copy database '%s'”
SQLSTATE: 42501
Description: In the syntax for creating a database, if the original database is not a template database, the user role does not have permission to create a database.
Solution: In the syntax for creating a database, if the original database is not a template database, only users who have the CREATEDB permission or the system administrator can create a database. Ensure that the user has the required permission.
GAUSS-00503: “invalid server encoding %d”
SQLSTATE: 42809
Description: In the syntax for creating a database, the specified encoding format is invalid.
Solution: Ensure that the encoding format must be GBK, UTF8, or Latin1.
GAUSS-00504: “invalid locale name: '%s'”
SQLSTATE: 42809
Description: When you create a database, the specified database character set is invalid.
Solution: In the syntax for creating a database, ensure that the character set specified for the new database must match that of the template database. Use the show lc_collate; command to query the character set of the template database.
GAUSS-00505: “new encoding (%s) is incompatible with the encoding of the template database (%s)”
SQLSTATE: 22023
Description: In the syntax for creating a database, the character encoding specified for the new database does not match that of the template database template0.
Solution: In the syntax for creating a database, ensure that the character encoding specified for the new database must match that of the template database template0. Use show server_encoding; to query the character encoding of the template database template0. Then, modify the character encoding specified for the created database.
GAUSS-00506: “new collation (%s) is incompatible with the collation of the template database (%s)”
SQLSTATE: 22023
Description: In the syntax for creating a database, the character set specified for the new database does not match that of the template database template0.
Solution: In the syntax for creating a database, ensure that the character set specified for the new database must match that of the template database template0. Use the show lc_collate; command to query the character set of the template database template0. Then, modify the character set specified for the created database.
GAUSS-00507: “new LC_CTYPE (%s) is incompatible with the LC_CTYPE of the template database (%s)”
SQLSTATE: 22023
Description: In the syntax for creating a database, the character type specified for the new database does not match that of the template database template0.
Solution: In the syntax for creating a database, ensure that the character type specified for the new database must match that of the template database template0. Use the show lc_ctype; command to query the character type of the template database template0. Then, modify the character type specified for the created database.
GAUSS-00508: “pg_global cannot be used as default tablespace”
SQLSTATE: 22023
Description: In the syntax for creating a database, the default tablespace specified for the new database is pg_global.
Solution: In the syntax for creating a database, ensure that the default tablespace specified for the new database is not pg_global. Currently, only the default tablespace is supported.
GAUSS-00509: “cannot assign new default tablespace '%s'”
SQLSTATE: 0A000
Description: In the syntax for creating a database, the default tablespace specified for the new database is pg_global.
Solution: In the syntax for creating a database, ensure that the directory for the tablespace is valid when specifying a tablespace other than the default tablespace and the global tablespace for the new tablespace. If the directory is invalid, create a valid directory.
GAUSS-00510: “database '%s' already exists”
SQLSTATE: 42P04
Description: The database name already exists.
Solution: Use the \l command to check whether the database name exists. If yes, rename the database.