1999-05-28 00:05:38 +08:00
|
|
|
=======================================================
|
2000-04-25 07:33:07 +08:00
|
|
|
Frequently Asked Questions (FAQ) for PostgreSQL V7.0
|
1999-05-28 00:05:38 +08:00
|
|
|
SCO UnixWare and OpenServer Specific
|
|
|
|
TO BE READ IN CONJUNCTION WITH THE NORMAL FAQ
|
|
|
|
=======================================================
|
2000-10-09 11:49:42 +08:00
|
|
|
last updated: $Date: 2000/10/09 03:49:42 $
|
1999-05-28 00:05:38 +08:00
|
|
|
|
2000-04-25 07:33:07 +08:00
|
|
|
current maintainer: Billy G. Allie (Bill.Allie@mug.org)
|
1999-05-28 00:05:38 +08:00
|
|
|
original author: Andrew Merrill (andrew@compclass.com)
|
|
|
|
|
|
|
|
|
2000-04-25 07:33:07 +08:00
|
|
|
PostgreSQL 7.0 can be built on SCO UnixWare 7 and SCO OpenServer 5.
|
1999-05-28 00:05:38 +08:00
|
|
|
On OpenServer, you can use either the OpenServer Development Kit or
|
|
|
|
the Universal Development Kit.
|
|
|
|
|
|
|
|
However, some tweaking may be needed, as described below.
|
|
|
|
|
|
|
|
Topics:
|
|
|
|
*) Skunkware
|
|
|
|
*) GNU Make
|
|
|
|
*) C++ and libpq++
|
|
|
|
*) Readline
|
|
|
|
*) Using the UDK on OpenServer
|
2000-04-25 07:33:07 +08:00
|
|
|
*) Compiling PostgreSQL using the UDK
|
1999-05-28 00:05:38 +08:00
|
|
|
*) Reading the PostgreSQL man pages on UnixWare
|
|
|
|
|
|
|
|
|
|
|
|
***************************************************************************
|
|
|
|
*) Skunkware
|
|
|
|
|
2000-10-09 11:49:42 +08:00
|
|
|
You should locate your copy of the SCO Skunkware CD. The Skunkware CD is
|
|
|
|
included with UnixWare 7 and current versions of OpenServer 5.
|
1999-05-28 00:05:38 +08:00
|
|
|
|
|
|
|
Skunkware includes ready-to-install versions of many popular programs that
|
|
|
|
are available on the Internet. For example, gzip, gunzip, GNU make, flex,
|
|
|
|
and bison are all included.
|
|
|
|
|
2000-10-09 11:49:42 +08:00
|
|
|
If you do not have this CD, the software on it is available via anonymous
|
|
|
|
ftp from ftp.sco.com/skunkware.
|
1999-05-28 00:05:38 +08:00
|
|
|
|
|
|
|
For UnixWare 7.1, this CD is now labeled "Open License Software Supplement".
|
|
|
|
|
2000-10-09 11:49:42 +08:00
|
|
|
Skunkware has different versions for UnixWare and OpenServer. Make sure
|
|
|
|
you install the correct version for your operating system, except as noted
|
|
|
|
below.
|
1999-05-28 00:05:38 +08:00
|
|
|
|
|
|
|
***************************************************************************
|
|
|
|
*) GNU Make
|
|
|
|
|
2000-10-09 11:49:42 +08:00
|
|
|
You need to use the GNU make program, which is on the Skunkware CD. By
|
|
|
|
default, it installs as /usr/local/bin/make. To avoid confusion with the
|
|
|
|
SCO make program, you may want to rename GNU make to gmake.
|
1999-05-28 00:05:38 +08:00
|
|
|
|
|
|
|
|
|
|
|
***************************************************************************
|
|
|
|
*) C++ and libpq++
|
|
|
|
|
|
|
|
I have not been able to build libpq++, the PostgreSQL C++ interface, with
|
|
|
|
the UnixWare or OpenServer C++ compilers. By default, building PostgreSQL
|
|
|
|
also builds the libpq++ interface. When that fails, it causes the entire
|
|
|
|
build of PostgreSQL to fail.
|
|
|
|
|
|
|
|
This is the problem if you see the following error message:
|
|
|
|
|
|
|
|
"pgenv.cc", line 47: error: no default constructor exists for class "string"
|
|
|
|
|
|
|
|
If you have this problem, you can disable building of libpq++ with the
|
|
|
|
following configure option:
|
|
|
|
|
|
|
|
configure --without-CXX
|
|
|
|
|
|
|
|
|
|
|
|
***************************************************************************
|
|
|
|
*) Readline
|
|
|
|
|
2000-10-09 11:49:42 +08:00
|
|
|
If you install the readline library, then psql (the PostgreSQL command line
|
|
|
|
SQL interpreter) remembers each command you type, and allows you to use
|
|
|
|
arrow keys to recall and edit previous commands. This is very helpful, and
|
|
|
|
is strongly recommended. The readline library is on the Skunkware CD.
|
1999-05-28 00:05:38 +08:00
|
|
|
|
|
|
|
The readline library is not included on the UnixWare 7.1 Skunkware CD. If
|
2000-10-09 11:49:42 +08:00
|
|
|
you have the UnixWare 7.0.0 or 7.0.1 Skunkware CDs, you can install it from
|
|
|
|
there. Otherwise, try ftp.sco.com/skunkware.
|
1999-05-28 00:05:38 +08:00
|
|
|
|
|
|
|
By default, readline installs into /usr/local/lib and /usr/local/include.
|
|
|
|
However, the PostgreSQL configure program will not find it there without
|
2000-10-09 11:49:42 +08:00
|
|
|
help. If you installed readline, then use the following options to
|
|
|
|
configure:
|
1999-05-28 00:05:38 +08:00
|
|
|
|
|
|
|
configure --with-libs=/usr/local/lib --with-includes=/usr/local/include
|
|
|
|
|
|
|
|
Putting this together with the no-C++ option above yields:
|
|
|
|
|
|
|
|
configure --with-libs=/usr/local/lib --with-includes=/usr/local/include --without-CXX
|
|
|
|
|
|
|
|
|
|
|
|
***************************************************************************
|
|
|
|
*) Using the UDK on OpenServer
|
|
|
|
|
|
|
|
If you are using the new Universal Development Kit (UDK) compiler on
|
|
|
|
OpenServer, you need to use different arguments to the configure program.
|
|
|
|
|
|
|
|
First, you need to specify the "unixware" template instead of the default.
|
|
|
|
|
|
|
|
Second, you need to specify the locations of the UDK libraries.
|
|
|
|
|
|
|
|
Putting these together:
|
|
|
|
|
|
|
|
configure --with-template=unixware --with-libs=/udk/usr/lib --with-includes=/udk/usr/include
|
|
|
|
|
|
|
|
Putting these together with the no-C++ and readline options from above:
|
|
|
|
|
|
|
|
./configure --with-template=unixware --with-libs="/udk/usr/lib /usr/local/lib" --with-includes="/udk/usr/include /usr/local/include" --without-CXX
|
|
|
|
|
2000-04-25 07:33:07 +08:00
|
|
|
***************************************************************************
|
|
|
|
*) Compiling PostgreSQL 7.0 with the UDK
|
|
|
|
|
|
|
|
The program, backend/utils/adt/int8.c, tickles a compiler bug with in the
|
2000-10-09 11:49:42 +08:00
|
|
|
following versions (and probably others as well) of the C compiler:
|
2000-04-25 07:33:07 +08:00
|
|
|
|
2000-10-09 11:49:42 +08:00
|
|
|
Optimizing C Compilation System (CCS) 3.2 08/18/98
|
|
|
|
Optimizing C Compilation System (CCS) 3.2 09/28/99
|
2000-04-25 07:33:07 +08:00
|
|
|
|
|
|
|
If you encounter an error compiling backend/utils/adt/int8.c, please apply
|
|
|
|
the following patch:
|
|
|
|
|
|
|
|
------------------------------8< CUT HERE >8------------------------------
|
2000-10-09 11:49:42 +08:00
|
|
|
*** src/backend/utils/adt/int8.c.orig Sat Oct 7 20:48:17 2000
|
|
|
|
--- src/backend/utils/adt/int8.c Sat Oct 7 20:52:03 2000
|
2000-04-25 07:33:07 +08:00
|
|
|
***************
|
2000-10-09 11:49:42 +08:00
|
|
|
*** 489,495 ****
|
|
|
|
if (arg1 < 1)
|
|
|
|
result = 0;
|
2000-04-25 07:33:07 +08:00
|
|
|
else
|
2000-10-09 11:49:42 +08:00
|
|
|
! for (i = arg1, result = 1; i > 0; --i)
|
|
|
|
result *= i;
|
2000-04-25 07:33:07 +08:00
|
|
|
|
2000-10-09 11:49:42 +08:00
|
|
|
PG_RETURN_INT64(result);
|
|
|
|
--- 489,495 ----
|
|
|
|
if (arg1 < 1)
|
|
|
|
result = 0;
|
2000-04-25 07:33:07 +08:00
|
|
|
else
|
2000-10-09 11:49:42 +08:00
|
|
|
! for (i = arg1, result = 1; i; --i)
|
|
|
|
result *= i;
|
|
|
|
|
|
|
|
PG_RETURN_INT64(result);
|
|
|
|
------------------------------8< CUT HERE >8------------------------------
|
|
|
|
|
|
|
|
The bind function in UnixWare 7.1+ has a problem when used with the AF_UNIX
|
|
|
|
family. The following patch provides a work-around for the problem (thanks
|
|
|
|
go to Oliver PRENANT <ohp@pyrenet.fre> for this patch).
|
|
|
|
|
|
|
|
------------------------------8< CUT HERE >8------------------------------
|
|
|
|
*** src/backend/libpq/pqcomm.c.orig Sun Oct 8 02:21:25 2000
|
|
|
|
--- src/backend/libpq/pqcomm.c Sun Oct 8 02:42:57 2000
|
|
|
|
***************
|
|
|
|
*** 329,334 ****
|
|
|
|
--- 329,341 ----
|
|
|
|
return STATUS_ERROR;
|
|
|
|
}
|
2000-04-25 07:33:07 +08:00
|
|
|
|
2000-10-09 11:49:42 +08:00
|
|
|
+ /* Work around a bug in UnixWare 7.1.x - accept is not returning the
|
|
|
|
+ * correct family when the family is AF_UNIX.
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+ if (port->raddr.sa.sa_family == 0)
|
|
|
|
+ port->raddr.sa.sa_family = AF_UNIX;
|
|
|
|
+
|
|
|
|
/* fill in the server (local) address */
|
|
|
|
addrlen = sizeof(port->laddr);
|
|
|
|
if (getsockname(port->sock, (struct sockaddr *) & port->laddr,
|
2000-04-25 07:33:07 +08:00
|
|
|
------------------------------8< CUT HERE >8------------------------------
|
1999-05-28 00:05:38 +08:00
|
|
|
|
|
|
|
***************************************************************************
|
|
|
|
*) Reading the PostgreSQL man pages on UnixWare
|
|
|
|
|
|
|
|
By default, the PostgreSQL man pages are installed into /usr/local/pgsql/man.
|
2000-10-09 11:49:42 +08:00
|
|
|
By default, UnixWare does not look there for man pages, so you will not be
|
|
|
|
able to read them.
|
1999-05-28 00:05:38 +08:00
|
|
|
|
2000-04-25 07:33:07 +08:00
|
|
|
You need to make the following changes to access the PostgreSQL man pages
|
|
|
|
from UnixWare.
|
|
|
|
|
|
|
|
1) You need to modify the MANPATH variable in /etc/default/man. I use:
|
1999-05-28 00:05:38 +08:00
|
|
|
|
2000-04-25 07:33:07 +08:00
|
|
|
MANPATH=/usr/lib/scohelp/%L/man:/usr/dt/man:/usr/man:/usr/share/man:scohelp:/usr/local/man:/usr/local/pgsql/man
|
1999-05-28 00:05:38 +08:00
|
|
|
|
2000-04-25 07:33:07 +08:00
|
|
|
2) Add a line that says '1sql' to /etc/default/manSection.
|
1999-05-28 00:05:38 +08:00
|
|
|
|
2000-04-25 07:33:07 +08:00
|
|
|
3) The man pages for SQL commands are, by default, placed in section 'l'
|
|
|
|
(normally used for "l"ocal pages). UnixWare does not support the 'l'
|
|
|
|
section.
|
1999-05-28 00:05:38 +08:00
|
|
|
|
2000-04-25 07:33:07 +08:00
|
|
|
The solution I use is to move all these pages from section 'l' to a section
|
|
|
|
named '1sql'. To following KSH script will perform the move and change the
|
|
|
|
section names in the man page:
|
1999-05-28 00:05:38 +08:00
|
|
|
|
2000-04-25 07:33:07 +08:00
|
|
|
------------------------------8< CUT HERE >8------------------------------
|
|
|
|
#!/bin/ksh
|
1999-05-28 00:05:38 +08:00
|
|
|
cd /usr/local/pgsql/man
|
2000-04-25 07:33:07 +08:00
|
|
|
mv man1 man.1
|
2000-05-02 18:57:11 +08:00
|
|
|
mkdir man.1sql
|
2000-04-25 07:33:07 +08:00
|
|
|
|
|
|
|
cd /usr/local/pgsql/man/manl
|
|
|
|
for i in *.l
|
1999-05-28 00:05:38 +08:00
|
|
|
do
|
2000-05-03 11:45:55 +08:00
|
|
|
sed -e '/^\.TH/s/"l"/"1sql"/' \
|
|
|
|
-e 's/\\fR(l)/\\fR(1sql)/' $i >../man.1sql/${i%.l}.1sql
|
1999-05-28 00:05:38 +08:00
|
|
|
done
|
2000-04-25 07:33:07 +08:00
|
|
|
cd /usr/local/pgsql/man
|
|
|
|
rm -rf manl
|
2000-05-02 18:57:11 +08:00
|
|
|
/usr/ucb/catman -M /usr/local/pgsql/man 1
|
|
|
|
/usr/ucb/catman -M /usr/local/pgsql/man 1sql
|
2000-04-25 07:33:07 +08:00
|
|
|
------------------------------8< CUT HERE >8------------------------------
|
|
|
|
|
|
|
|
After running this script, you can view the man pages using the 'man'
|
|
|
|
command. They will not be usable from the scohelp system.
|
|
|
|
|
|
|
|
I am working on integrating the man pages into the scohelp system. When I
|
|
|
|
generate a PostgreSQL package for UnixWare 7.x, the man pages will be
|
|
|
|
integrated into the scohelp system.
|
1999-05-28 00:05:38 +08:00
|
|
|
|
|
|
|
I have not tried using the PostgreSQL man pages on OpenServer. Volunteers??
|
|
|
|
|