Re: Remove deprecated role membership options from psql help for CREATE USER/GROUP

From: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
To: Japin Li <japinli(at)hotmail(dot)com>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Remove deprecated role membership options from psql help for CREATE USER/GROUP
Date: 2026-01-07 09:30:16
Message-ID: 5A39E825-95E5-40E9-98DC-22D89240B39F@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Jan 6, 2026, at 18:16, Japin Li <japinli(at)hotmail(dot)com> wrote:
>
>
> Hi,
>
> When I review [1], I found commit 8e78f0a1 deprecated the IN GROUP and USER
> clauses in CREATE ROLE, and also removed IN GROUP and USER from the psql \h
> CREATE ROLE help output.
>
> However, the psql help for the legacy synonyms CREATE USER and CREATE GROUP
> still lists the deprecated options:
>
> - IN GROUP role_name [, ...]
> - USER role_name [, ...]
>
> postgres=# \h create role
> Command: CREATE ROLE
> Description: define a new database role
> Syntax:
> CREATE ROLE name [ [ WITH ] option [ ... ] ]
>
> where option can be:
>
> SUPERUSER | NOSUPERUSER
> | CREATEDB | NOCREATEDB
> | CREATEROLE | NOCREATEROLE
> | INHERIT | NOINHERIT
> | LOGIN | NOLOGIN
> | REPLICATION | NOREPLICATION
> | BYPASSRLS | NOBYPASSRLS
> | CONNECTION LIMIT connlimit
> | [ ENCRYPTED ] PASSWORD 'password' | PASSWORD NULL
> | VALID UNTIL 'timestamp'
> | IN ROLE role_name [, ...]
> | ROLE role_name [, ...]
> | ADMIN role_name [, ...]
> | SYSID uid
>
> URL: https://www.postgresql.org/docs/devel/sql-createrole.html
>
> postgres=# \h create user
> Command: CREATE USER
> Description: define a new database role
> Syntax:
> CREATE USER name [ [ WITH ] option [ ... ] ]
>
> where option can be:
>
> SUPERUSER | NOSUPERUSER
> | CREATEDB | NOCREATEDB
> | CREATEROLE | NOCREATEROLE
> | INHERIT | NOINHERIT
> | LOGIN | NOLOGIN
> | REPLICATION | NOREPLICATION
> | BYPASSRLS | NOBYPASSRLS
> | CONNECTION LIMIT connlimit
> | [ ENCRYPTED ] PASSWORD 'password' | PASSWORD NULL
> | VALID UNTIL 'timestamp'
> | IN ROLE role_name [, ...]
> | IN GROUP role_name [, ...]
> | ROLE role_name [, ...]
> | ADMIN role_name [, ...]
> | USER role_name [, ...]
> | SYSID uid
>
> URL: https://www.postgresql.org/docs/devel/sql-createuser.html
>
> postgres=# \h create group
> Command: CREATE GROUP
> Description: define a new database role
> Syntax:
> CREATE GROUP name [ [ WITH ] option [ ... ] ]
>
> where option can be:
>
> SUPERUSER | NOSUPERUSER
> | CREATEDB | NOCREATEDB
> | CREATEROLE | NOCREATEROLE
> | INHERIT | NOINHERIT
> | LOGIN | NOLOGIN
> | REPLICATION | NOREPLICATION
> | BYPASSRLS | NOBYPASSRLS
> | CONNECTION LIMIT connlimit
> | [ ENCRYPTED ] PASSWORD 'password' | PASSWORD NULL
> | VALID UNTIL 'timestamp'
> | IN ROLE role_name [, ...]
> | IN GROUP role_name [, ...]
> | ROLE role_name [, ...]
> | ADMIN role_name [, ...]
> | USER role_name [, ...]
> | SYSID uid
>
> URL: https://www.postgresql.org/docs/devel/sql-creategroup.html
>
> Since CREATE USER is documented as equivalent to CREATE ROLE WITH LOGIN, and
> CREATE GROUP is equivalent to CREATE ROLE, their help syntax should remain
> consistent with CREATE ROLE.
>
> I propose removing the deprecated IN GROUP and USER lines from the help text
> of both CREATE USER and CREATE GROUP. This would be a simple documentation
> cleanup that aligns the psql help with current reality and avoids confusing
> users with obsolete syntax.
>
> [1] https://www.postgresql.org/message-id/4c5f895e-3281-48f8-b943-9228b7da6471%40gmail.com
>
> --
> Regards,
> Japin Li
> ChengDu WenWu Information Technology Co., Ltd.
>
> <v1-0001-Remove-deprecated-role-options-for-CREATE-USER-GR.patch>

```
This commit removes the deprecated IN GROUP and USER lines from the psql
help output for CREATE USER and CREATE GROUP.
```

The commit message claims to remove things from psql help output, but the change actually updated the SGML docs. Does the patch miss the change on psql?

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2026-01-07 09:35:04 Re: Simplify code building the LR conflict messages
Previous Message vignesh C 2026-01-07 09:22:26 Re: Newly created replication slot may be invalidated by checkpoint