postgresql/doc
Bruce Momjian 5b7bc48391 Update TODO list. 2000-01-21 03:55:22 +00:00
..
TODO.detail Update TODO list. 1999-11-22 18:05:47 +00:00
src Rename 7.0.0 to 7.0 to be consistent with prior release numbering. 2000-01-20 22:21:30 +00:00
FAQ Update FAQ. 1999-09-28 05:09:56 +00:00
FAQ_AIX Update from Andreas Zeugswetter <andreas.zeugswetter@telecom.at> 1999-09-14 15:34:49 +00:00
FAQ_DEV Update developers faq. 1999-12-24 16:46:11 +00:00
FAQ_DigitalUnix Attached is a patch with some fixes that (I think that) should go into 1998-12-18 07:08:03 +00:00
FAQ_FreeBSD Short little FAQ for FreeBSD 1998-01-07 02:33:46 +00:00
FAQ_HPUX Update faq and hpux faq. 1999-06-05 18:24:55 +00:00
FAQ_Irix Install proper Irix FAQ. 1999-06-08 16:27:26 +00:00
FAQ_Linux Update FAQ's for release. 1999-06-05 03:43:07 +00:00
FAQ_SCO FAQs contributed for this release. 1999-05-27 16:05:38 +00:00
FAQ_Solaris Fix to give super user and createdb user proper update catalog rights. 1999-09-27 16:44:56 +00:00
KNOWN_BUGS Add files to point to TODO list. 1999-07-01 05:31:22 +00:00
MISSING_FEATURES Add files to point to TODO list. 1999-07-01 05:31:22 +00:00
Makefile Clean up doc/Makefile to install manual pages. 1999-12-05 21:23:00 +00:00
README.Charsets I've sent 3 mails to pgsql-patches. There are two files, one for doc 1999-08-16 20:27:19 +00:00
README.NT Improve subquery error message, now says "More than one tuple returned 1999-12-29 22:57:17 +00:00
README.fsync Documentation on the fsync() patch from OpenLink 1996-09-19 20:22:23 +00:00
README.inet I agree. I think, though, that the best argument presented in the 1998-10-08 00:19:47 +00:00
README.locale Typo fix 1999-08-16 20:32:34 +00:00
README.mb document updated for 6.5.1 1999-07-11 22:59:26 +00:00
README.mb.jp document updated for 6.5.1 1999-07-11 22:59:26 +00:00
README.qnx4 Update for QNX. 1999-12-16 16:52:53 +00:00
TODO Update TODO list. 2000-01-21 03:55:22 +00:00
admin.ps.gz Fix typos and wording in v6.5 release summary per Fred Horsh. 1999-06-14 06:55:45 +00:00
admin.tar.gz HTML versions of docs for v6.5 release. 1999-06-14 06:59:34 +00:00
bug.template Update for 6.6. 1999-07-18 18:06:42 +00:00
internals.ps Add masters thesis to docs. 1999-01-18 01:09:14 +00:00
man.tar.gz Switch from old man pages to new ones generated from sgml. 1999-08-08 15:09:04 +00:00
postgres.tar.gz HTML versions of docs for v6.5 release. 1999-06-14 06:59:34 +00:00
programmer.ps.gz Fix URL for Norm Walsh's Style Sheets. 1999-06-14 06:56:31 +00:00
programmer.tar.gz HTML versions of docs for v6.5 release. 1999-06-14 06:59:34 +00:00
tutorial.ps.gz New versions of hardcopy for 6.5 release. 1999-06-03 04:18:58 +00:00
tutorial.tar.gz HTML versions of docs for v6.5 release. 1999-06-14 06:59:34 +00:00
user.ps.gz User's Guide for v6.5. 1999-06-14 06:25:03 +00:00
user.tar.gz Fix cross-reference to large objects in the CREATE TYPE section. 1999-06-14 16:32:41 +00:00

README.qnx4

PostgresSQL on QNX 4
--------------------

This port is an important step because PostgreSQL is now the only free
relational database with full SQL and ODBC support available for QNX 4.
The only commercial databases available are Empress RDBMS and Velocis
Database Server (not supported for Digital Unix).

The most effort required the emulation of System V semaphore sets,
shared memory and IPC and of some IEEE floating-point functionality. For
the Watcom compiler spinlocks have been implemented using POSIX semaphores.

It is recomended to use the GNU C compiler instead of the Watcom compiler
because the Watcom compiler doesn't support a int8 datatype (long or
long long int) and it does not have a C++ frontend.
It could be managed to build postgres using the Watcom compiler but it crashes
quite early. These problems probably could be solved. The only advantage would
be support of Tk and pgaccess. For the Watcom compiler some more modifications
have to be made which are not described here.

QNX 4 does not offer native support of shared libraries. Therefore the related
functionality cannot be used. Shared library support could probably be
implemented in future.

QNX 4 does not support UNIX domain sockets. Connections can only be made
with TCP/IP sockets. Therefore postmaster must always be started with the
-i option. Furthermore it would be useful to set the PGHOST variable.

Prerequisites:
--------------

The following prerequisites have been used:

QNX 4.25
Watcom C 10.6
GNU make
flex-2.5.4a.tar.gz (flex)
egcs111-qnx4-r20.tar[.gz] (GNU C)
perl 5.004_04
tcl8.0.3.tar.Z (Tcl)

flex can be built without any problems using the Watcom or GNU C compilers.

GNU C can be installed by
/etc/install -u egcs111-qnx4-r20.tar[.gz]

Although Tcl can be built after some slight code changes using the Watcom
compiler, the GNU C compiler should be used instead. Otherwise it would be
impossible to link postgres built with GNU C together with libtcl8.0.a built
with the Watcom compiler.
To make unix/tclUnixTest.c compilable uncomment
#include <sys/resource.h>
in it or
touch /usr/include/sys/resource.h
In unix/Makefile.in replace
	( echo cd $(TOP_DIR)/tests\; source all ) | ./tcltest
by
	( echo cd ../tests\; source all ) | ./tcltest
After that Tcl can be built and tested as stated in README.

Tk cannot be built with GNU C due to the lack of a stack version of the
X11 library. With the Watcom compiler Tk could be built but this is not useful
because of the link problems mentioned above.

Therefore the Tk interface and the pgaccess tool cannot be supported for a GNU C
version of PostgreSQL on QNX 4.

PostgreSQL:
-----------

On QNX 4 some headers are not in the directories expected. To avoid
modifications of the code the following links should be made:

ln -s /usr/local/bin/perl /usr/local/bin/perl5
ln -s /usr/include/errno.h /usr/include/sys/errno.h
ln -s /usr/include/ioctl.h /usr/include/sys/ioctl.h
ln -s /usr/src/pgsql/src/backend/port/qnx4/ipc.h /usr/include/sys/ipc.h
ln -s /usr/src/pgsql/src/backend/port/qnx4/sem.h /usr/include/sys/sem.h
ln -s /usr/src/pgsql/src/backend/port/qnx4/shm.h /usr/include/sys/shm.h

For ecgs-2.91.60 the file
/usr/local/lib/gcc-lib/i386-pc-qnx4/egcs-2.91.60/include/g++/stl_alloc.h
had to be patched (extern "C++" { ... } // extern "C++").
See attached patch.

If you use another ecpg version the include/g++ path in Makefile.qnx4
(CXXFLAGS) has to be adopted.

If all prerequisites are available postgres can be built and installed by
cd pgsql/src
./configure --with-tcl --with-perl --with-x
gmake all > make.log 2>&1
gmake install > make.install.log 2>&1
su
cd interfaces/perl5
gmake install
exit

All other steps can be carried out as stated in the INSTALL file.

Make problems:
--------------

Sometimes the Watcom library manager wlib crashes with SIGSEGV on some
object files. This is a general problem and not PostgreSQL related.
Currently bootstrap.o causes such a crash. The workaround is not to include
the object file into the SUBSYS.o but link it directly. For further information
see backend/Makefile and backend/bootstrap/Makefile.
libpgsql.a currently cannot be generated because of the same problem. But this
doesn't matter since shared libraries are not supported.

Currently yacc fails on interfaces/ecpg/preproc/preproc.y because of
exceeded maximum table size. You can generate the preproc.h and preproc.c
files on another platform and use them. This is only a problem when you use
the current source tree since preproc.h and preporc.c are included in official
distributions.

Regression tests:
-----------------

The majority of regression tests succeeded. The following tests failed:

int2, int4:
Error message "Result too large" instead of "Numerical result out of range".
Can be ignored.

int8, float4: 
Exponent expression "e+nnn" instead of "e+nn". Can be ignored.

float8:
Exponent expression "e+nnn" instead of "e+nn" and some slight difference
in the last digit.
Can be ignored.

geometry:
Some slight deviation in the last digit and "0" instead of "-0".
Can be ignored.

datetime, abstime, tinterval, horology:
Differences for years outside the normal Unix range, e.g. 1968
instead of 2105
Can be ignored.

create_function_2, triggers, misc, plpgsql:
Error messages due to the lack of shared library support.

rules:
Subject of further investigation.

numeric, numeric_big:
ERROR:  Cannot create unique index. Table contains non-unique values
Subject of further investigation. Probably because of the missing indices
these tests take a long time.

The reached state of this port should be sufficient for lot of applications.

Have fun!

Andreas Kardos
kardos@repas-aeg.de
1999-12-16


---------------------------------------------------------------------------

*** ./stl_alloc.h.orig	Sat Feb 28 05:17:28 1998
--- ./stl_alloc.h	Tue Nov 23 04:14:09 1999
***************
*** 120,125 ****
--- 120,126 ----
  #pragma set woff 1174
  #endif
  
+ extern "C++" {
  // Malloc-based allocator.  Typically slower than default alloc below.
  // Typically thread-safe and more storage efficient.
  #ifdef __STL_STATIC_TEMPLATE_MEMBER_BUG
***************
*** 682,687 ****
--- 683,689 ----
  # endif
  
  #endif /* ! __USE_MALLOC */
+ } // extern "C++"
  
  #if defined(__sgi) && !defined(__GNUC__) && (_MIPS_SIM != _MIPS_SIM_ABI32)
  #pragma reset woff 1174