ユーザ名とグループ

To define a new user, run the createuser utility program.

新しいユーザを定義するには、createuser ユーティリティプログラムを走らせます。

To assign a user or set of users to a new group, one must define the group itself, and assign users to that group. In Postgres these steps are not currently supported with a create group command. Instead, the groups are defined by inserting appropriate values into the pg_group system table, and then using the grant command to assign privileges to the group.

ユーザ、または、複数ユーザの組を新しいグループに割り振るには、まず、 グループそのものを定義して、それから、ユーザらをそのグループに割り当て なければなりません。Postgresで、この手順の create group コマンドによるサポートは、まだされてい ません。そのかわりに、pg_group システムテーブルに適 切な値を挿入し、grant コマンドを使って権限をそのグ ループに割り当てることによって、グループを定義します。

ユーザの登録

グループの登録

Currently, there is no easy interface to set up user groups. You have to explicitly insert/update the pg_group table. For example: jolly=> insert into pg_group (groname, grosysid, grolist) jolly=> values ('posthackers', '1234', '{5443, 8261}'); INSERT 548224 jolly=> grant insert on foo to group posthackers; CHANGE jolly=> The fields in pg_group are: * groname: the group name. This a name and should be purely alphanumeric. Do not include underscores or other punctuation. * grosysid: the group id. This is an int4. This should be unique for each group. * grolist: the list of pg_user id's that belong in the group. This is an int4[].

現在、ユーザグループを設定する簡単なインターフェースはありあませ ん。明示的に pg_group テーブルを insert/update しなければなりません。 例: jolly=> insert into pg_group (groname, grosysid, grolist) jolly=> values ('posthackers', '1234', '{5443, 8261}'); INSERT 548224 jolly=> grant insert on foo to group posthackers; CHANGE jolly=> pg_group のフィールドの中身は: * groname: グループ名。name 型で純粋な英数字にすべき。 下線('_')やその他の特殊文字を使用してはいけません。 * grosysid: グループID。int4 型。各グループ毎に一意にすべき。 * grolist: そのグループに所属する pg_user の id リスト。 int4[] 型。

ユーザのグループへの割り当て