Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2498d82

Browse files
committed
Clean up some stray remaining references to pg_shadow, pg_user, pg_group.
1 parentf590ed1 commit2498d82

File tree

10 files changed

+114
-118
lines changed

10 files changed

+114
-118
lines changed

‎doc/src/sgml/ref/dropuser.sgml

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/dropuser.sgml,v 1.32 2005/05/29 03:32:18 momjian Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/dropuser.sgml,v 1.33 2005/08/15 02:40:20 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -33,17 +33,16 @@ PostgreSQL documentation
3333

3434
<para>
3535
<application>dropuser</application> removes an existing
36-
<productname>PostgreSQL</productname> user
37-
<emphasis>and</emphasis> the databases which that user owned.
38-
Only superusers (users with <literal>usesuper</literal> set in
39-
the <literal>pg_shadow</literal> table) can destroy
40-
<productname>PostgreSQL</productname> users.
36+
<productname>PostgreSQL</productname> user.
37+
Only superusers and users with the <literal>CREATEROLE</> privilege can
38+
remove <productname>PostgreSQL</productname> users. (To remove a
39+
superuser, you must yourself be a superuser.)
4140
</para>
4241

4342
<para>
4443
<application>dropuser</application> is a wrapper around the
45-
<acronym>SQL</acronym> command <xref linkend="SQL-DROPUSER"
46-
endterm="SQL-DROPUSER-title">.
44+
<acronym>SQL</acronym> command <xref linkend="SQL-DROPROLE"
45+
endterm="SQL-DROPROLE-title">.
4746
There is no effective difference between dropping users via
4847
this utility and via other methods for accessing the server.
4948
</para>
@@ -62,8 +61,8 @@ PostgreSQL documentation
6261
<term><replaceable class="parameter">username</replaceable></term>
6362
<listitem>
6463
<para>
65-
Specifies the name of the <productname>PostgreSQL</productname> user to be removed.
66-
You will be prompted for a name if none is specified on the command line.
64+
Specifies the name of the <productname>PostgreSQL</productname> user to be removed.
65+
You will be prompted for a name if none is specified on the command line.
6766
</para>
6867
</listitem>
6968
</varlistentry>
@@ -74,7 +73,7 @@ PostgreSQL documentation
7473
<listitem>
7574
<para>
7675
Echo the commands that <application>dropuser</application> generates
77-
and sends to the server.
76+
and sends to the server.
7877
</para>
7978
</listitem>
8079
</varlistentry>
@@ -111,10 +110,10 @@ PostgreSQL documentation
111110
<term><option>--host <replaceable class="parameter">host</replaceable></></term>
112111
<listitem>
113112
<para>
114-
Specifies the host name of the machine on which the
115-
server
116-
is running. If the value begins with a slash, it is used
117-
as the directory for the Unix domain socket.
113+
Specifies the host name of the machine on which the
114+
server
115+
is running. If the value begins with a slash, it is used
116+
as the directory for the Unix domain socket.
118117
</para>
119118
</listitem>
120119
</varlistentry>
@@ -124,9 +123,9 @@ PostgreSQL documentation
124123
<term><option>--port <replaceable class="parameter">port</replaceable></></term>
125124
<listitem>
126125
<para>
127-
Specifies the TCP port or local Unix domain socket file
128-
extension on which the server
129-
is listening for connections.
126+
Specifies the TCP port or local Unix domain socket file
127+
extension on which the server
128+
is listening for connections.
130129
</para>
131130
</listitem>
132131
</varlistentry>
@@ -179,8 +178,8 @@ PostgreSQL documentation
179178
<title>Diagnostics</title>
180179

181180
<para>
182-
In case of difficulty, see <xref linkend="SQL-DROPUSER"
183-
endterm="sql-dropuser-title"> and <xref linkend="APP-PSQL"> for
181+
In case of difficulty, see <xref linkend="SQL-DROPROLE"
182+
endterm="sql-droprole-title"> and <xref linkend="APP-PSQL"> for
184183
discussions of potential problems and error messages.
185184
The database server must be running at the
186185
targeted host. Also, any default connection settings and environment
@@ -199,7 +198,7 @@ PostgreSQL documentation
199198
server:
200199
<screen>
201200
<prompt>$ </prompt><userinput>dropuser joe</userinput>
202-
<computeroutput>DROPUSER</computeroutput>
201+
<computeroutput>DROPROLE</computeroutput>
203202
</screen>
204203
</para>
205204

@@ -209,10 +208,10 @@ PostgreSQL documentation
209208
command:
210209
<screen>
211210
<prompt>$ </prompt><userinput>dropuser -p 5000 -h eden -i -e joe</userinput>
212-
<computeroutput>User "joe"and any owned databaseswill be permanentlydeleted.
211+
<computeroutput>Role "joe" will be permanentlyremoved.
213212
Are you sure? (y/n) </computeroutput><userinput>y</userinput>
214-
<computeroutput>DROPUSER "joe"
215-
DROPUSER</computeroutput>
213+
<computeroutput>DROPROLE "joe"
214+
DROPROLE</computeroutput>
216215
</screen>
217216
</para>
218217
</refsect1>
@@ -223,7 +222,7 @@ DROP USER</computeroutput>
223222

224223
<simplelist type="inline">
225224
<member><xref linkend="app-createuser"></member>
226-
<member><xref linkend="sql-dropuser" endterm="sql-dropuser-title"></member>
225+
<member><xref linkend="sql-droprole" endterm="sql-droprole-title"></member>
227226
<member>Environment Variables (<xref linkend="libpq-envars">)</member>
228227
</simplelist>
229228
</refsect1>

‎doc/src/sgml/ref/reindex.sgml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/reindex.sgml,v 1.27 2005/06/22 21:14:28 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/reindex.sgml,v 1.28 2005/08/15 02:40:20 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -176,9 +176,10 @@ REINDEX { INDEX | TABLE | DATABASE | SYSTEM } <replaceable class="PARAMETER">nam
176176

177177
<para>
178178
If corruption is suspected in the indexes of any of the shared
179-
system catalogs (<structname>pg_database</structname>,
180-
<structname>pg_group</structname>,
181-
<structname>pg_shadow</structname>, or
179+
system catalogs (<structname>pg_authid</structname>,
180+
<structname>pg_auth_members</structname>,
181+
<structname>pg_database</structname>,
182+
<structname>pg_shdepend</structname>, or
182183
<structname>pg_tablespace</structname>), then a standalone server
183184
must be used to repair it. <command>REINDEX</> will not process
184185
shared catalogs in multiuser mode.

‎doc/src/sgml/xaggr.sgml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/xaggr.sgml,v 1.28 2005/03/30 02:08:39 neilc Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/xaggr.sgml,v 1.29 2005/08/15 02:40:23 tgl Exp $
33
-->
44

55
<sect1 id="xaggr">
@@ -141,22 +141,22 @@ CREATE AGGREGATE array_accum (
141141
<programlisting>
142142
SELECT attrelid::regclass, array_accum(attname)
143143
FROM pg_attribute
144-
WHERE attnum &gt; 0 AND attrelid = 'pg_user'::regclass
144+
WHERE attnum &gt; 0 AND attrelid = 'pg_tablespace'::regclass
145145
GROUP BY attrelid;
146146

147-
attrelid |array_accum
148-
----------+-----------------------------------------------------------------------------
149-
pg_user| {usename,usesysid,usecreatedb,usesuper,usecatupd,passwd,valuntil,useconfig}
147+
attrelid|array_accum
148+
---------------+---------------------------------------
149+
pg_tablespace| {spcname,spcowner,spclocation,spcacl}
150150
(1 row)
151151

152152
SELECT attrelid::regclass, array_accum(atttypid)
153153
FROM pg_attribute
154-
WHERE attnum &gt; 0 AND attrelid = 'pg_user'::regclass
154+
WHERE attnum &gt; 0 AND attrelid = 'pg_tablespace'::regclass
155155
GROUP BY attrelid;
156156

157-
attrelid|array_accum
158-
----------+------------------------------
159-
pg_user| {19,23,16,16,16,25,702,1009}
157+
attrelid|array_accum
158+
---------------+-----------------
159+
pg_tablespace| {19,26,25,1034}
160160
(1 row)
161161
</programlisting>
162162
</para>

‎src/backend/libpq/crypt.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
1010
* Portions Copyright (c) 1994, Regents of the University of California
1111
*
12-
* $PostgreSQL: pgsql/src/backend/libpq/crypt.c,v 1.64 2005/06/29 22:51:54 tgl Exp $
12+
* $PostgreSQL: pgsql/src/backend/libpq/crypt.c,v 1.65 2005/08/15 02:40:25 tgl Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -57,7 +57,7 @@ md5_crypt_verify(const Port *port, const char *role, char *client_pass)
5757
if (shadow_pass==NULL||*shadow_pass=='\0')
5858
returnSTATUS_ERROR;
5959

60-
/* We can't do crypt withpg_shadowMD5 passwords */
60+
/* We can't do crypt with MD5 passwords */
6161
if (isMD5(shadow_pass)&&port->auth_method==uaCrypt)
6262
{
6363
ereport(LOG,
@@ -75,7 +75,7 @@ md5_crypt_verify(const Port *port, const char *role, char *client_pass)
7575
crypt_pwd=palloc(MD5_PASSWD_LEN+1);
7676
if (isMD5(shadow_pass))
7777
{
78-
/*pg_shadow already encrypted, only do salt */
78+
/*stored password already encrypted, only do salt */
7979
if (!EncryptMD5(shadow_pass+strlen("md5"),
8080
(char*)port->md5Salt,
8181
sizeof(port->md5Salt),crypt_pwd))
@@ -86,7 +86,7 @@ md5_crypt_verify(const Port *port, const char *role, char *client_pass)
8686
}
8787
else
8888
{
89-
/*pg_shadow plain, double-encrypt */
89+
/*stored password is plain, double-encrypt */
9090
char*crypt_pwd2=palloc(MD5_PASSWD_LEN+1);
9191

9292
if (!EncryptMD5(shadow_pass,
@@ -121,10 +121,7 @@ md5_crypt_verify(const Port *port, const char *role, char *client_pass)
121121
default:
122122
if (isMD5(shadow_pass))
123123
{
124-
/*
125-
* Encrypt user-supplied password to match MD5 in
126-
* pg_shadow
127-
*/
124+
/* Encrypt user-supplied password to match stored MD5 */
128125
crypt_client_pass=palloc(MD5_PASSWD_LEN+1);
129126
if (!EncryptMD5(client_pass,
130127
port->user_name,

‎src/backend/libpq/pg_hba.conf.sample

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# "host" is either a plain or SSL-encrypted TCP/IP socket, "hostssl" is an
2121
# SSL-encrypted TCP/IP socket, and "hostnossl" is a plain TCP/IP socket.
2222
#
23-
# DATABASE can be "all", "sameuser", "samegroup", a database name, or
23+
# DATABASE can be "all", "sameuser", "samerole", a database name, or
2424
# a comma-separated list thereof.
2525
#
2626
# USER can be "all", a user name, a group name prefixed with "+", or
@@ -42,7 +42,7 @@
4242
#
4343
# Database and user names containing spaces, commas, quotes and other special
4444
# characters must be quoted. Quoting one of the keywords "all", "sameuser" or
45-
# "samegroup" makes the name lose its special character, and just match a
45+
# "samerole" makes the name lose its special character, and just match a
4646
# database or username with that name.
4747
#
4848
# This file is read on server startup and when the postmaster receives

‎src/backend/utils/misc/superuser.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* All code should use either of these two functions to find out
77
* whether a given user is a superuser, rather than examining
8-
*pg_shadow.usesuper directly, so that the escape hatch built in for
8+
*pg_authid.rolsuper directly, so that the escape hatch built in for
99
* the single-user case works.
1010
*
1111
*
@@ -14,7 +14,7 @@
1414
*
1515
*
1616
* IDENTIFICATION
17-
* $PostgreSQL: pgsql/src/backend/utils/misc/superuser.c,v 1.32 2005/06/28 05:09:02 tgl Exp $
17+
* $PostgreSQL: pgsql/src/backend/utils/misc/superuser.c,v 1.33 2005/08/15 02:40:26 tgl Exp $
1818
*
1919
*-------------------------------------------------------------------------
2020
*/

‎src/bin/scripts/dropuser.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
66
* Portions Copyright (c) 1994, Regents of the University of California
77
*
8-
* $PostgreSQL: pgsql/src/bin/scripts/dropuser.c,v 1.14 2005/06/21 04:02:33 tgl Exp $
8+
* $PostgreSQL: pgsql/src/bin/scripts/dropuser.c,v 1.15 2005/08/1502:40:28 tgl Exp $
99
*
1010
*-------------------------------------------------------------------------
1111
*/
@@ -101,20 +101,20 @@ main(int argc, char *argv[])
101101
}
102102

103103
if (dropuser==NULL)
104-
dropuser=simple_prompt("Enter name ofuser to drop: ",128, true);
104+
dropuser=simple_prompt("Enter name ofrole to drop: ",128, true);
105105

106106
if (interactive)
107107
{
108108
char*reply;
109109

110-
printf(_("User \"%s\" will be permanently removed.\n"),dropuser);
110+
printf(_("Role \"%s\" will be permanently removed.\n"),dropuser);
111111
reply=simple_prompt("Are you sure? (y/n) ",1, true);
112112
if (check_yesno_response(reply)!=1)
113113
exit(0);
114114
}
115115

116116
initPQExpBuffer(&sql);
117-
appendPQExpBuffer(&sql,"DROPUSER %s;\n",fmtId(dropuser));
117+
appendPQExpBuffer(&sql,"DROPROLE %s;\n",fmtId(dropuser));
118118

119119
conn=connectDatabase("postgres",host,port,username,password,progname);
120120

@@ -124,7 +124,7 @@ main(int argc, char *argv[])
124124

125125
if (PQresultStatus(result)!=PGRES_COMMAND_OK)
126126
{
127-
fprintf(stderr,_("%s: removal ofuser \"%s\" failed: %s"),
127+
fprintf(stderr,_("%s: removal ofrole \"%s\" failed: %s"),
128128
progname,dropuser,PQerrorMessage(conn));
129129
PQfinish(conn);
130130
exit(1);
@@ -133,7 +133,7 @@ main(int argc, char *argv[])
133133
PQfinish(conn);
134134
if (!quiet)
135135
{
136-
puts("DROPUSER");
136+
puts("DROPROLE");
137137
fflush(stdout);
138138
}
139139
exit(0);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp