CREATE GROUP 中文man页面

系统
CREATE GROUP 将在数据库集群上创建一个新组。 要使用这条命令,你必须是数据库超级用户。

NAME

CREATE GROUP - 定义一个新的用户组

SYNOPSIS

CREATE GROUP name [ [ WITH ] option [ ... ] ]

where option can be:

     SYSID gid
   | USER  username [, ...]

DESCRIPTION 描述

CREATE GROUP 将在数据库集群上创建一个新组。 要使用这条命令,你必须是数据库超级用户。


 使用 ALTER GROUP [alter_group(7)]  修改组成员,DROP GROUP [drop_group(7)] 删除一个组。  

PARAMETERS 参数

name
组名。
gid
SYSID 子句可以用于选择 PostgreSQL 里新组的组标识(group ID)。 不过,这样做不是必须的。


 如果没有声明这个,将使用从 1 开始的,已分配的最高组标识加一作为缺省值。

username

 包括到组里面的用户列表。用户必须已经存在。

EXAMPLES 例子


 创建一个空组:

CREATE GROUP staff;


 创建一个有成员的组:

CREATE GROUP marketing WITH USER jonathan, david;

#p#

NAME

CREATE GROUP - define a new user group

SYNOPSIS

CREATE GROUP name [ [ WITH ] option [ ... ] ]

where option can be:

     SYSID gid
   | USER  username [, ...]

DESCRIPTION

CREATE GROUP will create a new group in the database cluster. You must be a database superuser to use this command.

Use ALTER GROUP [alter_group(7)] to change a group's membership, and DROP GROUP [drop_group(7)] to remove a group.  

PARAMETERS

name
The name of the group.
gid
The SYSID clause can be used to choose the PostgreSQL group ID of the new group. It is not necessary to do so, however.

If this is not specified, the highest assigned group ID plus one, starting at 1, will be used as default.

username
A list of users to include in the group. The users must already exist.

EXAMPLES

Create an empty group:

CREATE GROUP staff;

Create a group with members:

CREATE GROUP marketing WITH USER jonathan, david;

责任编辑:韩亚珊 来源: CMPP.net
相关推荐

2011-08-18 19:15:25

group中文man

2011-08-24 13:26:19

CREATE SEQU中文man

2011-08-24 13:39:44

CREATE TYPE中文man

2011-08-24 11:18:53

CREATE LANG中文man

2011-08-24 11:23:20

CREATE OPER中文man

2011-08-24 13:23:10

CREATE SCHE中文man

2011-08-24 11:02:11

CREATE DOMA中文man

2011-08-24 10:59:19

CREATE DATA中文man

2011-08-24 11:05:36

CREATE FUNC中文man

2011-08-24 11:31:47

CREATE RULE中文man

2011-08-24 14:25:43

DROP GROUP中文man

2011-08-24 13:36:25

CREATE TRIG中文man

2011-08-24 13:46:39

CREATE VIEW中文man

2011-08-24 10:56:32

CREATE CONV中文man

2011-08-24 10:46:36

CREATE AGGR中文man

2011-08-24 11:15:24

CREATE INDE中文man

2011-08-24 13:29:20

CREATE TABL中文man

2011-08-24 13:43:09

CREATE USER中文man

2011-08-24 13:32:56

CREATE TABL中文man

2011-08-24 10:50:05

create_cast中文man
点赞
收藏

51CTO技术栈公众号