您可参考如下操作创建模式。
-
标准语法
teledb=# create schema teledb_schema; CREATE SCHEMA
注意当标准语法不存在时,才创建扩展语法。
-
扩展语法
teledb=# create schema if not exists teledb_schema; NOTICE: schema "teledb_schema" already exists, skipping CREATE SCHEMA
-
指定所属用户
teledb=# create schema teledb_schema_owner AUTHORIZATION teledb_user; CREATE SCHEMA teledb=# \dn teledb_schema_owner List of schemas Name | Owner ----------------------+-------------- teledb_schema_owner | teledb_user (1 row)