Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 58fffea

Browse files
committed
Cleanups for large objects, so file is trucated on open, fix for
solaris/spare shared libararies, new error message for postmaster startup, and makefile cleanups.
1 parent 1b70585 commit 58fffea

File tree

9 files changed

+38
-25
lines changed

9 files changed

+38
-25
lines changed

INSTALL

+6-6
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ PostgreSQL:
119119

120120
To check for disk space, use command "df -k".
121121

122-
4) Ftp file ftp://ftp.postgresql.org/pub/postgresql-v6.3.2.tar.gz from the
122+
4) Ftp file ftp://ftp.postgresql.org/pub/postgresql-6.3.2.tar.gz from the
123123
Internet. Store it in your home directory.
124124

125125
5) Some platforms use flex. If your system uses flex then make sure
@@ -161,7 +161,7 @@ PostgreSQL:
161161
step. Type (with the gunzip line and the following line typed as one
162162
line):
163163
cd
164-
gunzip -c postgresql-v6.3.2.tar.gz |
164+
gunzip -c postgresql-6.3.2.tar.gz |
165165
tar xvf - src/bin/pg_dump/pg_dumpall
166166
chmod a+x src/bin/pg_dump/pg_dumpall
167167
src/bin/pg_dump/pg_dumpall > db.out
@@ -227,7 +227,7 @@ PostgreSQL:
227227

228228
10) Unzip and untar the new source file. Type
229229
cd /usr/src/pgsql
230-
gunzip -c ~/postgresql-v6.3.2.tar.gz | tar xvf -
230+
gunzip -c ~/postgresql-6.3.2.tar.gz | tar xvf -
231231

232232
11) Configure the source code for your system. It is this step at which
233233
you can specify your actual source path and installation paths for
@@ -487,7 +487,7 @@ PostgreSQL:
487487
root:bin.
488488
#!/bin/sh
489489
[ -x /usr/local/pgsql/bin/postmaster ] && {
490-
su -l pgsql -c 'exec /usr/local/pgsql/bin/postmaster
490+
su -l postgres -c 'exec /usr/local/pgsql/bin/postmaster
491491
-D/usr/local/pgsql/data
492492
-S -o -F > /usr/local/pgsql/errlog' &
493493
echo -n ' pgsql'
@@ -552,7 +552,7 @@ PostgreSQL:
552552
rm -rf /usr/local/pgsql_6_0
553553
# Also delete old database directory tree if it is not in
554554
# /usr/local/pgsql_6_0/data
555-
rm ~/postgresql-v6.3.2.tar.gz
555+
rm ~/postgresql-6.3.2.tar.gz
556556

557557
26) You will probably want to print out the documentation. Here is how
558558
you might do it if you have Ghostscript on your system and are
@@ -579,7 +579,7 @@ PostgreSQL:
579579
supported platforms. We therefore ask you to let us know if you did
580580
or did not get PostgreSQL to work on you system. Please send a
581581
mail message to pgsql-ports@postgresql.org telling us the following:
582-
- The version of PostgreSQL (v6.3.2, 6.2.1, beta 970703, etc.).
582+
- The version of PostgreSQL (6.3.2, 6.2.1, beta 970703, etc.).
583583
- Your operating system (i.e. RedHat v4.0 Linux v2.0.26).
584584
- Your hardware (SPARC, i486, etc.).
585585
- Did you compile, install and run the regression tests cleanly?

src/backend/libpq/be-fsstubs.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.19 1998/01/07 21:03:12 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.20 1998/05/12 21:43:58 momjian Exp $
1111
*
1212
* NOTES
1313
* This should be moved to a more appropriate place. It is here
@@ -344,7 +344,7 @@ lo_export(Oid lobjId, text *filename)
344344
*/
345345
oumask = umask((mode_t) 0);
346346
StrNCpy(fnamebuf, VARDATA(filename), VARSIZE(filename) - VARHDRSZ + 1);
347-
fd = open(fnamebuf, O_CREAT | O_WRONLY, 0666);
347+
fd = open(fnamebuf, O_CREAT | O_WRONLY | O_TRUNC, 0666);
348348
umask(oumask);
349349
if (fd < 0)
350350
{ /* error */

src/backend/main/main.c

+5-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.18 1998/04/30 14:25:13 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.19 1998/05/12 21:43:59 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -31,11 +31,10 @@
3131
#include "tcop/tcopprot.h" /* for PostgresMain() */
3232

3333
#define NOROOTEXEC "\
34-
\n\"root\" execution of the PostgreSQL backend is not permitted\n\n\
35-
It is highly recommended that the backend be started under it's own userid\n\
36-
to prevent possible system security compromise. This can be accomplished\n\
37-
by placing the following command in the PostgreSQL startup script.\n\n\
38-
echo \"postmaster >/var/log/pglog 2>&1 &\" | su - postgres\n\n"
34+
\n\"root\" execution of the PostgreSQL backend is not permitted.\n\n\
35+
The backend must be started under it's own userid to prevent\n\
36+
a possible system security compromise. See the INSTALL file for\n\
37+
more information on how to properly start the postmaster.\n\n"
3938

4039
int
4140
main(int argc, char *argv[])

src/interfaces/libpgtcl/Makefile.in

+9-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.13 1998/04/27 14:54:50 scrappy Exp $
10+
# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.14 1998/05/12 21:44:01 momjian Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

@@ -31,7 +31,7 @@ endif
3131
install-shlib-dep :=
3232
shlib :=
3333

34-
LIBPQ = -L $(SRCDIR)/interfaces/libpq -lpq
34+
LIBPQ = -L$(SRCDIR)/interfaces/libpq -lpq
3535

3636
ifeq ($(PORTNAME), linux)
3737
LINUX_ELF=@LINUX_ELF@
@@ -59,6 +59,13 @@ ifeq ($(PORTNAME), i386_solaris)
5959
CFLAGS += $(CFLAGS_SL)
6060
endif
6161

62+
ifeq ($(PORTNAME), sparc_solaris)
63+
install-shlib-dep := install-shlib
64+
shlib := libpgtcl.so.1
65+
LDFLAGS_SL = -G
66+
CFLAGS += $(CFLAGS_SL)
67+
endif
68+
6269
ifeq ($(PORTNAME), univel)
6370
install-shlib-dep := install-shlib
6471
shlib := libpgtcl.so.1

src/interfaces/libpq/Makefile.in

+7-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.17 1998/05/06 23:51:06 momjian Exp $
10+
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.18 1998/05/12 21:44:02 momjian Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

@@ -53,6 +53,12 @@ ifeq ($(PORTNAME), i386_solaris)
5353
LDFLAGS_SL = -G -z text
5454
CFLAGS += $(CFLAGS_SL)
5555
endif
56+
ifeq ($(PORTNAME), sparc_solaris)
57+
install-shlib-dep := install-shlib
58+
shlib := libpq.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
59+
LDFLAGS_SL = -G
60+
CFLAGS += $(CFLAGS_SL)
61+
endif
5662
ifeq ($(PORTNAME), univel)
5763
install-shlib-dep := install-shlib
5864
shlib := libpq.so.1

src/interfaces/libpq/fe-lobj.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-lobj.c,v 1.11 1997/09/18 20:22:49 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-lobj.c,v 1.12 1998/05/12 21:44:03 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -449,7 +449,7 @@ lo_export(PGconn *conn, Oid lobjId, char *filename)
449449
/*
450450
* open the file to be written to
451451
*/
452-
fd = open(filename, O_CREAT | O_WRONLY, 0666);
452+
fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0666);
453453
if (fd < 0)
454454
{ /* error */
455455
sprintf(conn->errorMessage,

src/man/psql.1

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" This is -*-nroff-*-
22
.\" XXX standard disclaimer belongs here....
3-
.\" $Header: /cvsroot/pgsql/src/man/Attic/psql.1,v 1.23 1998/01/26 01:42:53 scrappy Exp $
3+
.\" $Header: /cvsroot/pgsql/src/man/Attic/psql.1,v 1.24 1998/05/12 21:44:05 momjian Exp $
44
.TH PSQL UNIX 1/20/96 PostgreSQL PostgreSQL
55
.SH NAME
66
psql - run the interactive query front-end
@@ -298,7 +298,8 @@ Establish a connection to a new database. The previous connection is closed.
298298
Perform a frontend copy. This is an operation that runs a SQL COPY command,
299299
but instead of the backend reading or writing a specified file, and
300300
consequently requiring special user privilege, psql reads or writes the
301-
file and routes the data to or from the backend.
301+
file and routes the data to or from the backend. The default TAB
302+
delimiter is used.
302303
.IP "\ed [\fItable\fR]"
303304
List tables in the database, or if
304305
.IR table

src/test/examples/testlo.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/test/examples/testlo.c,v 1.7 1997/09/25 16:35:50 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/test/examples/testlo.c,v 1.8 1998/05/12 21:44:07 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -168,7 +168,7 @@ exportFile(PGconn *conn, Oid lobjId, char *filename)
168168
/*
169169
* open the file to be written to
170170
*/
171-
fd = open(filename, O_CREAT | O_WRONLY, 0666);
171+
fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0666);
172172
if (fd < 0)
173173
{ /* error */
174174
fprintf(stderr, "can't open unix file\"%s\"",

src/test/examples/testlo2.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/test/examples/Attic/testlo2.c,v 1.6 1997/09/25 16:35:52 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/test/examples/Attic/testlo2.c,v 1.7 1998/05/12 21:44:08 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -164,7 +164,7 @@ exportFile(PGconn *conn, Oid lobjId, char *filename)
164164
/*
165165
* open the file to be written to
166166
*/
167-
fd = open(filename, O_CREAT | O_WRONLY, 0666);
167+
fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0666);
168168
if (fd < 0)
169169
{ /* error */
170170
fprintf(stderr, "can't open unix file\"%s\"",

0 commit comments

Comments
 (0)