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

Commitca9540d

Browse files
committed
Add docs for initdb --auth.
1 parente7029b2 commitca9540d

File tree

9 files changed

+201
-59
lines changed

9 files changed

+201
-59
lines changed

‎configure

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12063,11 +12063,6 @@ LIBOBJS="$LIBOBJS open.$ac_objext"
1206312063
LIBOBJS="$LIBOBJS rand.$ac_objext" ;;
1206412064
esac
1206512065

12066-
# Win32 can't do rename or unlink on an open file
12067-
case $host_os in mingw*|cygwin*)
12068-
LIBOBJS="$LIBOBJS dirmod.$ac_objext" ;;
12069-
esac
12070-
1207112066
if test "$with_readline" = yes; then
1207212067
echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
1207312068
echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6

‎configure.in

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $PostgreSQL: pgsql/configure.in,v 1.369 2004/07/20 20:37:13 momjian Exp $
2+
dnl $PostgreSQL: pgsql/configure.in,v 1.370 2004/08/01 06:19:16 momjian Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -911,11 +911,6 @@ AC_LIBOBJ(open)
911911
AC_LIBOBJ(rand) ;;
912912
esac
913913

914-
# Win32 can't do rename or unlink on an open file
915-
case $host_os in mingw*|cygwin*)
916-
AC_LIBOBJ(dirmod) ;;
917-
esac
918-
919914
if test "$with_readline" = yes; then
920915
PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER
921916
AC_CHECK_FUNCS([rl_completion_matches rl_filename_completion_function])

‎doc/src/sgml/ref/initdb.sgml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/initdb.sgml,v 1.31 2004/07/14 17:55:09 petere Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/initdb.sgml,v 1.32 2004/08/01 06:19:18 momjian Exp $
33
PostgreSQL documentation
44
-->
55

@@ -98,6 +98,19 @@ PostgreSQL documentation
9898

9999
<para>
100100
<variablelist>
101+
<varlistentry>
102+
<term><option>-A <replaceable class="parameter">authmethod</replaceable></option></term>
103+
<term><option>--auth=<replaceable class="parameter">authmethod</replaceable></option></term>
104+
<listitem>
105+
<para>
106+
This option specifies the authentication method for local users
107+
used in <filename>pg_hba.conf</>. Do not use <literal>trust</>
108+
unless you trust all local users on your system. <literal>Trust</>
109+
is the default for ease of installation.
110+
</para>
111+
</listitem>
112+
</varlistentry>
113+
101114
<varlistentry>
102115
<term><option>-D <replaceable class="parameter">directory</replaceable></option></term>
103116
<term><option>--pgdata=<replaceable class="parameter">directory</replaceable></option></term>

‎src/Makefile.global.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*-makefile-*-
2-
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.190 2004/07/30 12:26:40 petere Exp $
2+
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.191 2004/08/01 06:19:19 momjian Exp $
33

44
#------------------------------------------------------------------------------
55
# All PostgreSQL makefiles include this file and use the variables it sets,
@@ -347,7 +347,7 @@ endif
347347
#
348348
# substitute implementations of the C library
349349

350-
LIBOBJS = @LIBOBJS@ exec.o noblock.o path.o pipe.o pgsleep.o pgstrcasecmp.o sprompt.o thread.o
350+
LIBOBJS = @LIBOBJS@dirmod.oexec.o noblock.o path.o pipe.o pgsleep.o pgstrcasecmp.o sprompt.o thread.o
351351

352352
ifneq (,$(LIBOBJS))
353353
LIBS := -lpgport$(LIBS)

‎src/backend/commands/dbcommands.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.137 2004/06/25 21:55:53 tgl Exp $
12+
* $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.138 2004/08/01 06:19:22 momjian Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -915,7 +915,6 @@ remove_dbtablespaces(Oid db_id)
915915
Relationrel;
916916
HeapScanDescscan;
917917
HeapTupletuple;
918-
charbuf[MAXPGPATH+100];
919918

920919
rel=heap_openr(TableSpaceRelationName,AccessShareLock);
921920
scan=heap_beginscan(rel,SnapshotNow,0,NULL);
@@ -938,17 +937,11 @@ remove_dbtablespaces(Oid db_id)
938937
continue;
939938
}
940939

941-
#ifndefWIN32
942-
snprintf(buf,sizeof(buf),"rm -rf '%s'",dstpath);
943-
#else
944-
snprintf(buf,sizeof(buf),"rmdir /s /q \"%s\"",dstpath);
945-
#endif
946-
if (system(buf)!=0)
940+
if (!rmtree(dstpath, true))
947941
{
948942
ereport(WARNING,
949943
(errmsg("could not remove database directory \"%s\"",
950944
dstpath),
951-
errdetail("Failing system command was: %s",buf),
952945
errhint("Look in the postmaster's stderr log for more information.")));
953946
}
954947

‎src/bin/initdb/Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
66
# Portions Copyright (c) 1994, Regents of the University of California
77
#
8-
# $PostgreSQL: pgsql/src/bin/initdb/Makefile,v 1.41 2004/05/24 01:01:37 momjian Exp $
8+
# $PostgreSQL: pgsql/src/bin/initdb/Makefile,v 1.42 2004/08/01 06:19:23 momjian Exp $
99
#
1010
#-------------------------------------------------------------------------
1111

@@ -15,13 +15,16 @@ include $(top_builddir)/src/Makefile.global
1515

1616
overrideCPPFLAGS := -DFRONTEND -I$(libpq_srcdir)$(CPPFLAGS)
1717

18-
OBJS=initdb.o exec.o
18+
OBJS=initdb.odirmod.oexec.o
1919

2020
all: submake-libpq submake-libpgport initdb
2121

2222
initdb:$(OBJS)$(libpq_builddir)/libpq.a
2323
$(CC)$(CFLAGS)$(OBJS)$(libpq)$(LDFLAGS)$(LIBS) -o$@$(X)
2424

25+
dirmod.c:% :$(top_srcdir)/src/port/%
26+
rm -f$@&&$(LN_S)$<.
27+
2528
exec.c:% :$(top_srcdir)/src/port/%
2629
rm -f$@&&$(LN_S)$<.
2730

‎src/bin/initdb/initdb.c

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
* Portions Copyright (c) 1994, Regents of the University of California
4040
* Portions taken from FreeBSD.
4141
*
42-
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.45 2004/08/0105:59:13 momjian Exp $
42+
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.46 2004/08/0106:19:23 momjian Exp $
4343
*
4444
*-------------------------------------------------------------------------
4545
*/
@@ -146,7 +146,6 @@ char backend_exec[MAXPGPATH];
146146

147147
staticvoid*xmalloc(size_tsize);
148148
staticchar*xstrdup(constchar*s);
149-
staticboolrmtree(char*path,boolrmtopdir);
150149
staticchar**replace_token(char**lines,char*token,char*replacement);
151150
staticchar**readfile(char*path);
152151
staticvoidwritefile(char*path,char**lines);
@@ -251,30 +250,6 @@ xstrdup(const char *s)
251250
returnresult;
252251
}
253252

254-
/*
255-
* delete a directory tree recursively
256-
* assumes path points to a valid directory
257-
* deletes everything under path
258-
* if rmtopdir is true deletes the directory too
259-
*/
260-
staticbool
261-
rmtree(char*path,boolrmtopdir)
262-
{
263-
charbuf[MAXPGPATH+64];
264-
265-
#ifndefWIN32
266-
/* doesn't handle .* files, but we don't make any... */
267-
snprintf(buf,sizeof(buf),"rm -rf \"%s\"%s",path,
268-
rmtopdir ?"" :"/*");
269-
#else
270-
snprintf(buf,sizeof(buf),"%s /s /q \"%s\"",
271-
rmtopdir ?"rmdir" :"del",path);
272-
#endif
273-
274-
return !system(buf);
275-
}
276-
277-
278253
/*
279254
* make a copy of the array of lines, with token replaced by replacement
280255
* the first time it occurs on each line.

‎src/include/port.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $PostgreSQL: pgsql/src/include/port.h,v 1.45 2004/07/23 01:58:36 momjian Exp $
9+
* $PostgreSQL: pgsql/src/include/port.h,v 1.46 2004/08/01 06:19:24 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -148,6 +148,8 @@ extern intpgunlink(const char *path);
148148
#defineunlink(path)pgunlink(path)
149149
#endif
150150

151+
externboolrmtree(char*path,boolrmtopdir);
152+
151153
#ifdefWIN32
152154

153155
/* open() replacement to allow delete of held files */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp