]> granicus.if.org Git - postgresql/commit
Make the world somewhat safe for (not from) DELETE FROM pg_shadow;
authorPeter Eisentraut <peter_e@gmx.net>
Sat, 8 Sep 2001 15:24:00 +0000 (15:24 +0000)
committerPeter Eisentraut <peter_e@gmx.net>
Sat, 8 Sep 2001 15:24:00 +0000 (15:24 +0000)
commitc0d4d5473a09cb7f6682a84abaee29e087c5886c
treeb61a851605fb862d27c3764bc341de79a565bb6f
parentfdbf796f3634ddf837a76f8146656299cd1d260f
Make the world somewhat safe for (not from) DELETE FROM pg_shadow;

Assign the fixed user id 1 to the user created by initdb.
A stand-alone backend will always set the user id to 1.
(Consequently, the name of that user is no longer important.)

In stand-alone mode, the user id 1 will have implicit superuser
status, to allow repairs even if there are no users defined.

Print a warning message when starting in stand-alone mode when no
users are defined.

Disallow dropping the current user and session user.

Granting/revoking superuser status also grants/revokes usecatupd.
(Previously, it would never grant it back.  This could lead to "deadlocks".)

CREATE USER and CREATE GROUP will start allocating user ids at 100
(unless explicitly specified), to prevent accidental creation of a
superuser (plus some room for future extensions).
12 files changed:
doc/src/sgml/ref/initdb.sgml
doc/src/sgml/ref/postgres-ref.sgml
doc/src/sgml/user-manag.sgml
src/backend/catalog/genbki.sh
src/backend/commands/user.c
src/backend/utils/init/miscinit.c
src/backend/utils/init/postinit.c
src/backend/utils/misc/superuser.c
src/bin/initdb/initdb.sh
src/include/catalog/catversion.h
src/include/catalog/pg_shadow.h
src/include/miscadmin.h