]> granicus.if.org Git - postgresql/blob - INSTALL
Add new information for utility commands.
[postgresql] / INSTALL
1 POSTGRESQL INSTALLATION INSTRUCTIONS
2 Copyright (c) 1997 Regents of  the University of California
3
4 This is file /usr/src/pgsql/INSTALL.  It contains notes on how to install
5 PostgreSQL v6.4.  Up to date information on PostgreSQL may be found at
6 http://www.postgresql.org.
7
8 PostgreSQL is an RDBMS database server.  It is not completely ANSI SQL
9 compliant, but with each release it gets closer.
10
11 PostgreSQL, formerly called Postgres95, is a derivative of Postgres 4.2
12 (the last release of the UC Berkeley research project).  For copyright
13 terms for PostgreSQL, please see the file named COPYRIGHT.  This version
14 was developed by a team of developers on the Postgres developers mailing
15 list.  Version 1 (through 1.01) was developed by Jolly Chen and Andrew Yu.
16
17 The installation notes below assume the following (except where noted):
18   - Commands are Unix-compatible. See note below.
19   - Defaults are used except where noted.
20   - User postgres is the Postgres superuser.
21   - The source path is /usr/src/pgsql (other paths are possible).
22   - The runtime path is /usr/local/pgsql (other paths are possible).
23
24 Commands were tested on RedHat Linux version 4.0 using the bash shell.
25 Except where noted, they will probably work on most systems. Commands
26 like ps and tar vary wildly on what options you should use on each
27 platform. USE COMMON SENSE before typing in these commands.
28
29 Our Makefiles require GNU make (called gmake in this document) and
30 also assume that "install" accepts BSD options. The INSTALL
31 variable in the Makefiles is set to the BSD-compatible version of
32 install. On some systems, you will have to find a BSD-compatible
33 install command (eg. bsdinst, which comes with the MIT X Window System
34 distribution) 
35
36
37 REQUIREMENTS TO RUN POSTGRESQL
38 ------------------------------
39
40 PostgreSQL has been tested on the following platforms:
41
42    aix            IBM on AIX 3.2.5 or 4.x
43    alpha          DEC Alpha AXP on Digital Unix 2.0, 3.2, 4.0
44    BSD44_derived  OSs derived from 4.4-lite BSD (NetBSD, FreeBSD)
45    bsdi           BSD/OS 2.0, 2.01, 2.1, 3.0
46    dgux           DG/UX 5.4R4.11
47    hpux           HP PA-RISC on HP-UX 9.0, 10
48    i386_solaris   i386 Solaris
49    irix5          SGI MIPS on IRIX 5.3
50    linux          Intel x86 on Linux 2.0 and Linux ELF
51                   SPARC on Linux ELF
52                   PPC on Linux ELF
53                   (For non-ELF Linux, see LINUX_ELF below).
54    sco            SCO 3.2v5
55    sparc_solaris  SUN SPARC on Solaris 2.4, 2.5, 2.5.1
56    sunos4         SUN SPARC on SunOS 4.1.3
57    svr4           Intel x86 on Intel SVR4 and MIPS
58    ultrix4        DEC MIPS on Ultrix 4.4
59
60 PostgreSQL has known problems/bugs on the following platforms:
61
62    nextstep       Motorola MC68K or Intel x86 on NeXTSTEP 3.2
63
64 PostgreSQL is also known to work on a number of other platforms that the
65 authors have not personally tested.
66
67 You should have at least 8 MB of memory and at least 45 MB of disk space
68 to hold the source, binaries, and user databases.  After installation
69 you may reduce this to about 3 Mbytes plus space for user databases.
70
71 To those upgrading from PostgreSQL 6.3.*:
72 ----------------------------------------
73
74 A dump/restore is required for those running 6.3.*, or you can use the
75 new pg_upgrade command to upgrade your data files without
76 dumping/loading them.  See the new pg_upgrade manual page.
77
78 To those doing a fresh install or upgrading from previous releases of
79 PostgreSQL:
80 ----------------------------------------------
81
82   1) Read any last minute information and platform specific porting
83      notes.  There are some platform specific notes at the end of this
84      file for Ultrix4.x, Linux, BSD/OS and NeXT.  There are other
85      files in directory /usr/src/pgsql/doc, including files FAQ-Irix
86      and FAQ-Linux.  Also look in directory ftp://ftp.postgresql.org/pub.
87      If there is a file called INSTALL in this directory then this
88      file will contain the latest installation information.
89
90      Please note that a "tested" platform in the list given earlier
91      simply means that someone went to the effort at some point of making
92      sure that a PostgreSQL distribution would compile and run on this
93      platform without modifying the code.  Since the current developers
94      will not have access to all of these platforms, some of them may not
95      compile cleanly and pass the regression tests in the current
96      release due to minor problems.  Any such known problems and their
97      solutions will be posted in ftp://ftp.postgresql.org/pub/INSTALL.
98
99   2) Create account postgres if it does not already exist.
100
101   3) Log into account postgres.
102
103   3a) Check that you have sufficient disk space.  You will need about
104       17 Mbytes for /usr/src/pgsql, about 2 Mbytes for /usr/local/pgsql
105       (excluding your database) and 1 Mbyte for an empty database.
106       For the regression tests, you will need an extra 20 Mbytes.
107       You will also need about 3 Mbytes for the distribution tar file.
108
109       We therefore recommend that during installation and testing you
110       have well over 20 Mbytes free under /usr/local and another 5 MB
111       free on the disk partition containing your database.  Once you
112       delete the source files, tar file and regression database, you
113       will need 2 Mbytes for /usr/local/pgsql, 1 Mbyte for the empty
114       database, plus about five times the space you would require to
115       store your database data in a flat file.
116
117       To check for disk space, use command "df -k".
118
119   4) Ftp file ftp://ftp.postgresql.org/pub/postgresql-6.4.tar.gz from the
120      Internet.  Store it in your home directory.
121
122   5) Some platforms use flex.  If your system uses flex then make sure
123      you have a good version.  Type
124         flex --version
125
126      If the flex command is not found then you probably do not need it.
127      If the version is 2.5.2 or 2.5.4 or greater then you are okay.  If it
128      is 2.5.3 or before 2.5.2 then you will have to upgrade flex.  You may
129      get it at ftp://prep.ai.mit.edu/pub/gnu/flex-2.5.4.tar.gz.
130
131      If you need flex and don't have it or have the wrong version, then
132      you will be told so when you attempt to compile the program.  Feel
133      free to skip this step if you aren't sure you need it.  If you do
134      need it then you will be told to install/upgrade flex when you try to
135      compile.
136
137      To install it, type the following:
138         cd
139         gunzip -c flex-2.5.4.tar.gz | tar xvf -
140         cd flex-2.5.4
141         configure --prefix=/usr
142         make
143         make check
144         # You must be root when typing the next line.
145         make install
146         cd
147         rm -rf flex-2.5.4
148
149      This will update files /usr/man/man1/flex.1, /usr/bin/flex,
150      /usr/lib/libfl.a, /usr/include/FlexLexer.h and will add link
151      /usr/bin/flex++ which points to flex.
152
153   6) If you are upgrading an existing system then back up your database.
154      For alpha- and beta-level releases, the database format is liable
155      to change often every few weeks with no notice besides a quick comment
156      in the HACKERS mailing list.  Full releases always require a dump/reload
157      from previous releases.  It is therefore a bad idea to skip this
158      step.  Type (with the gunzip line and the following line typed as one
159      line):
160         cd
161         gunzip -c postgresql-6.4.tar.gz |
162             tar xvf - src/bin/pg_dump/pg_dumpall
163         chmod a+x src/bin/pg_dump/pg_dumpall
164         src/bin/pg_dump/pg_dumpall > db.out
165         rm -rf src
166      If you wish to preserve object id's (oids), then use the -o
167      option when running pg_dumpall.  However, unless you have a
168      special reason for doing this, don't do it.
169
170      If the pg_dumpall command seems to take a long time and you think
171      it might have died, then, from another terminal, use "ls -l db.out"
172      several times to see if the size of the file is growing.
173
174      Please note that if you are upgrading from a version prior to
175      Postgres95 v1.09 then you must back up your database, install
176      Postgres95 v1.09, restore your database, then back it up again.
177
178      You should also read the appropriate files pgsql/migration/*.
179
180      You must make sure that your database is not updated in the middle of
181      your backup.  If necessary, bring down postmaster, edit the permissions
182      in file /usr/local/pgsql/data/pg_hba.conf to allow only you on, then
183      bring postmaster back up.
184
185   7) If you are upgrading an existing system then kill the postmaster.  Type
186        ps -ax | grep postmaster
187      This should list the process numbers for a number of processes.  Type
188      the following line, with "???" replaced by the process id for process
189      "postmaster".  (Do not use the id for process "grep postmaster".)  Type
190        kill ???
191      with "???" modified as indicated.
192
193   8) If you are upgrading an existing system then move the old directories
194      out of the way.  If you are short of disk space then you may have to
195      back up and delete the directories instead.  If you do this, save the
196      old database in the /usr/local/pgsql/data directory tree.  At a
197      minimum, save file /usr/local/pgsql/data/pg_hba.conf.
198
199      Type the following:
200         su
201         cd /usr/src
202         mv pgsql pgsql_6_0
203         cd /usr/local
204         mv pgsql pgsql_6_0
205         exit
206
207      If you are not using /usr/local/pgsql/data as your data directory
208      (check to see if environment variable PGDATA is set to something
209      else) then you will also want to move this directory in the same
210      manner.
211
212   9) Make new source and install directories.  The actual paths can be
213      different for your installation; be consistant with your configuration
214      in step (11).
215      Type
216         su
217         cd /usr/src
218         mkdir pgsql
219         chown postgres:postgres pgsql
220         cd /usr/local
221         mkdir pgsql
222         chown postgres:postgres pgsql
223         exit
224
225  10) Unzip and untar the new source file.  Type
226         cd /usr/src/pgsql
227         gunzip -c ~/postgresql-6.4.tar.gz | tar xvf -
228
229  11) Configure the source code for your system.  It is this step at which
230      you can specify your actual source path and installation paths for
231      the build process (see the --prefix option below).  Type
232         cd /usr/src/pgsql/src
233         ./configure
234
235      The configure program will list the template files available and
236      ask you to choose one.  A lot of times, an appropriate template
237      file is chosen for you, and you can just press Enter to accept the
238      default.  If the default is not appropriate, then type in the
239      appropriate template file and press Enter.  (If you do this, then
240      send email to scrappy@hub.org stating the output of the program
241      './config.guess' and what the template file should be.)
242
243      Once you have entered the template file, you will be asked a
244      number of questions about your particular configuration.  These
245      can be skipped by adding parameters to the configure command above.
246      The following parameters can be tagged onto the end of the configure
247      command:
248
249        --prefix=BASEDIR   Selects a different base directory for the
250                           installation of the PostgreSQL configuration.
251                           The default is /usr/local/pgsql.
252
253        --enable-hba       Enables Host Based Authentication (DEFAULT)
254
255        --enable-locale    Enables USE_LOCALE
256
257        --enable-cassert   Enables ASSERT_CHECKING
258
259        --with-template=TEMPLATE
260                           Use template file TEMPLATE - the template
261                           files are assumed to be in the directory
262                           src/template, so look there for proper values.
263                           (If the configure script cannot find the
264                           specified template file, it will ask you for
265                           one).
266
267        --with-pgport=PORT Sets the port that the postmaster process
268                           listens for incoming connections on.  The
269                           default for this is port 5432.
270
271        --with-tcl         Enables programs requiring Tcl/Tk and X11,
272                           including pgtclsh and libpgtcl.
273
274        --with-perl        Enables the perl interface.
275
276        --with-includes=DIRS
277                           Include DIRS in list of directories searched
278                           for header files.  (Typical use will need
279                           --with-includes=/usr/local/include)
280
281        --with-libs=DIRS
282        --with-libraries=DIRS
283                           Include DIRS in list of directories searched
284                           for archive libraries.  (Typical use will need
285                           --with-libraries=/usr/local/lib)
286
287        --with-CC=compiler
288                           Use a specific C compiler that the configure
289                           script cannot find.
290
291        --with-CXX=compiler
292        --without-CXX
293                           Use a specific C++ compiler that the configure
294                           script cannot find, or exclude C++ compilation
295                           altogether.
296
297      As an example, here is the configure script I use on a Sparc
298      Solaris 2.5 system with /opt/postgres being the install base.
299
300        % ./configure --prefix=/opt/postgres 
301                 --with-template=sparc_solaris-gcc --with-pgport=5432
302                 --enable-hba
303
304      Of course, in a real shell, you would type these three lines all
305      on the same line.
306
307  12) Compile the program.  Type
308         cd /usr/src/pgsql/src
309         gmake all >& make.log &
310         tail -f make.log
311
312      The last line displayed will hopefully be "All of PostgreSQL is
313      successfully made. Ready to install."  At this point, or earlier
314      if you wish, type control-C to get out of tail.  (If you have
315      problems later on you may wish to examine file make.log for
316      warning and error messages.)
317
318      If your computer does not have gmake (GNU make) then try running
319      make instead throughout the rest of these notes.
320
321      Please note that you will probably find a number of warning
322      messages in make.log.  Unless you have problems later on, these
323      messages may be safely ignored.
324
325      If the compiler fails with an error stating that the flex command
326      cannot be found then install flex as described earlier.  Next,
327      change directory back to this directory, type "make clean", then
328      recompile again.
329
330  13) Install the program.  Type
331         cd /usr/src/pgsql/src
332         gmake install >& make.install.log &
333         tail -f make.install.log
334
335      The last line displayed will be "gmake[1]: Leaving directory
336      `/usr/src/pgsql/src/man'".  At this point, or earlier if you wish,
337      type control-C to get out of tail.
338
339  14) If necessary, tell UNIX how to find your shared libraries.  If you
340      are using Linux-ELF do ONE of the following, preferably the first:
341
342        a) As root, edit file /etc/ld.so.conf.  Add line
343              /usr/local/pgsql/lib
344           to the file.  Then run command /sbin/ldconfig.
345
346        b) In a bash shell, type
347              export LD_LIBRARY_PATH=/usr/local/pgsql/lib
348
349        c) In a csh shell, type
350              setenv LD_LIBRARY_PATH /usr/local/pgsql/lib
351
352      Please note that the above commands may vary wildly for different
353      operating systems.  Check the platform specific notes, such as
354      those for Ultrix4.x or and for non-ELF Linux.
355
356      If, when you create the database, you get the message "pg_id: can't
357      load library 'libpq.so'" then the above step was necessary.  Simply
358      do this step, then try to create the database again.
359
360  15) If it has not already been done, then prepare account postgres
361      for using PostgreSQL.  Any account that will use PostgreSQL must
362      be similarily prepared.  (The following instructions are for a
363      bash shell.  Adapt accordingly for other shells.)
364
365      Add the following lines to your login shell, ~/.bash_profile:
366         PATH=$PATH:/usr/local/pgsql/bin
367         MANPATH=$MANPATH:/usr/local/pgsql/man
368         PGLIB=/usr/local/pgsql/lib
369         PGDATA=/usr/local/pgsql/data
370         export PATH MANPATH PGLIB PGDATA
371
372      Make sure that you have defined these variables before continuing
373      with the remaining steps.  The easiest way to do this is to type:
374         source ~/.bash_profile
375
376  16) Create the database.  DO NOT DO THE FOLLOWING AS ROOT!  This would
377      be a major security hole.  Type
378         initdb
379
380  17) Set up permissions to access the database system.  Do this by editing
381      file /usr/local/pgsql/data/pg_hba.conf.  The instructions are
382      included in the file.  (If your database is not located in the
383      default location, i.e. if PGDATA is set to point elsewhere, then the
384      location of this file will change accordingly.)  This file should be
385      made read only again once you are finsihed.
386
387      If you are upgrading, you can NOT copy file pg_hba.conf from your
388      old database on top of the one in your new database.  You will
389      have to re-do your changes.
390
391
392  18) If you wish to skip the regression tests then skip to step 21.
393
394      The file /usr/src/pgsql/src/test/regress/README has detailed
395      instructions for running and interpreting the regression tests.
396      A short version follows here:
397
398      Start the postmaster in preparation for the regression tests.  First,
399      set the timezone for Berkeley, California.  On some systems you may do
400      this by setting environment variable TZ.  I.e., using bash, type
401         export TZ=PST8PDT
402
403      Now start the postmaster daemon running in the background by typing
404         cd
405         nohup postmaster > regress.log 2>&1 &
406
407      Run postmaster from your Postgres super user account (typically
408      account postgres).  DO NOT RUN POSTMASTER FROM THE ROOT ACCOUNT.
409
410  19) Run the regression tests.  Type
411
412         cd /usr/src/pgsql/src/test/regress
413         gmake clean
414         gmake all runtest
415
416      You do not need to type "gmake clean" if this is the first time you
417      are running the tests.
418
419      You should get on the screen (and also written to file ./regress.out)
420      a series of statements stating which tests passed and which tests
421      failed.  Please note that it can be normal for some of the tests to
422      "fail".  For the failed tests, use diff to compare the files in
423      directories ./results and ./expected.  If float8 failed, type
424      something like:
425         cd /usr/src/pgsql/src/test/regress
426         diff -w expected/float8.out results
427
428     "Failed" tests may have failed due to slightly different error messages,
429      output formatting, failure to set the timezone correctly for your
430      platform, etc.  "Failures" of this type do not indicate a problem with
431      PostgreSQL.
432
433      For a i686/Linux-ELF platform, no tests failed since this is the
434      v6.4 regression testing reference platform.
435
436      For the SPARC/Linux-ELF platform, using the 970525 beta version of
437      PostgreSQL v6.2 the following tests "failed":
438      float8 and geometry "failed" due to minor precision differences in
439      floating point numbers.  select_views produces massively different output,
440      but the differences are due to minor floating point differences.
441
442      Conclusion?  If you do see failures, try to understand the nature of
443      the differences and then decide if those differences will affect your
444      intended use of PostgreSQL.  However, keep in mind that this is likely
445      to be the most solid release of PostgreSQL to date, incorporating many
446      bug fixes from v6.2.1, and that previous versions of PostgreSQL have been
447      in use successfully for some time now.
448
449      After running the tests, type
450         destroydb regression
451         cd /usr/src/pgsql/src/test/regress
452         gmake clean
453
454  20) Stop the postmaster as described in step 7.  Then restore the
455      timezone to it's normal setting.  If you changed the timezone by
456      modifying environment variable TZ then one way to do this is to
457      log out of, then back into, account postgres.
458
459  21) Start the postmaster daemon running.  Type
460         cd
461         nohup postmaster > server.log 2>&1 &
462      Run postmaster from your Postgres super user account (typically
463      account postgres).  DO NOT RUN POSTMASTER FROM THE ROOT ACCOUNT.
464
465  22) If you haven't already done so, this would be a good time to modify
466      your computer so that it will automatically start postmaster whenever
467      you boot your computer.
468
469      Here are some suggestions on how to do this, contributed by various
470      users.
471
472      Whatever you do, postmaster must be run by user postgres AND NOT BY
473      ROOT.  This is why all of the examples below start by switching user
474      (su) to postgres.  These commands also take into account the fact
475      that environment variables like PATH and PGDATA may not be set properly.
476
477      The examples are as follows.  Use them with extreme caution.
478
479        a) Edit file rc.local on NetBSD or file rc2.d on SPARC Solaris
480           2.5.1 to contain the following single line:
481              su postgres -c "/usr/local/pgsql/bin/postmaster -S -D
482                      /usr/local/pgsql/data"
483
484        b) In FreeBSD 2.2-RELEASE edit /usr/local/etc/rc.d/pgsql.sh to
485           contain the following lines and make it chmod 755 and chown
486           root:bin.
487              #!/bin/sh
488              [ -x /usr/local/pgsql/bin/postmaster ] && {
489                su -l postgres -c 'exec /usr/local/pgsql/bin/postmaster
490                        -D/usr/local/pgsql/data
491                        -S -o -F > /usr/local/pgsql/errlog' &
492                echo -n ' pgsql'
493              }
494           You may put the line breaks as shown above.  The shell is smart
495           enough to keep parsing beyond end-of-line if there is an
496           expression unfinished.  The exec saves one layer of shell under
497           the postmaster process so the parent is init.  Note:  Unlike most
498           other examples, this one has been tested.
499
500        c) In RedHat v4.0 Linux edit file /etc/inittab to contain the
501           following single line:
502              pg:2345:respawn:/bin/su - postgres -c
503                      "/usr/local/pgsql/bin/postmaster -D/usr/local/pgsql/data
504                      >> /usr/local/pgsql/server.log 2>&1" >/dev/null
505           (The author of this example says this example will revive the
506           postmaster if it dies, but he doesn't know if there are other side
507           effects.)
508
509        d) The contrib/linux area of the PostgreSQL distribution has an example
510           init.d script compatible with and tested using recent RedHat packages.
511
512  22a) If you haven't already done so, this would be a good time to modify
513       your computer to do regular maintainence.  The following should be
514       done at regular intervals:
515
516         a) Run the SQL command vacuum.  This will clean up your database.
517         b) Back up your system.  (You should probably keep the last few
518            backups on hand.)  Ideally, no one else should be using the
519            system at the time.
520
521       Ideally, the above tasks should be done by a shell script that is
522       run nightly or weekly by cron.  Look at the man page for crontab
523       for a starting point on how to do this.  (If you do it, please
524       e-mail us a copy of your shell script.  We would like to set up
525       our own systems to do this too.)
526
527  23) If you are upgrading an existing system then reload your old database.
528      Type
529         cd
530         psql -e template1 < db.out
531
532      If your pre-v6.2 database uses either path or polygon geometric data types,
533      then you will need to upgrade any columns containing those types. To
534      do so, type (from within psql)
535         update YourTable set PathCol = UpgradePath(PathCol);
536         update YourTable set PolyCol = UpgradePoly(PolyCol);
537         ...
538         vacuum;
539
540      UpgradePath() checks to see that a path value is consistant with the
541      old syntax, and will not update a column which fails that examination.
542      UpgradePoly() cannot verify that a polygon is in fact from an old
543      syntax, but RevertPoly() is provided to reverse the effects of a
544      mis-applied upgrade.
545
546  24) If you are a new user, you may wish to play with Postgres as described
547      below.
548
549  25) Clean up after yourself.  Type
550         rm -rf /usr/src/pgsql_6_0
551         rm -rf /usr/local/pgsql_6_0
552         # Also delete old database directory tree if it is not in
553         #  /usr/local/pgsql_6_0/data
554         rm ~/postgresql-6.4.tar.gz
555
556  26) You will probably want to print out the documentation.  Here is how
557      you might do it if you have Ghostscript on your system and are
558      writing to a laserjet printer.
559         alias gshp='gs -sDEVICE=laserjet -r300 -dNOPAUSE'
560         export GS_LIB=/usr/share/ghostscript:/usr/share/ghostscript/fonts
561         # Print out the man pages.
562         man -a -t /usr/local/pgsql/man/*/* > manpage.ps
563         gshp -sOUTPUTFILE=manpage.hp manpage.ps
564         rm manpage.ps
565         lpr -l -s -r manpage.hp
566         # Print out the Postgres95 User Manual, version 1.0,
567         #  Sept. 5, 1996.
568         cd /usr/src/pgsql/doc
569         gshp -sOUTPUTFILE=userguide.hp userguide.ps
570         lpr -l -s -r userguide.hp
571
572      If you are a developer, you will probably want to also print out
573      the Postgres Implemention Guide, version 1.0, October 1, 1995.
574      This is a WWW document located at
575      http://www.postgresql.org/docs/impguide.
576
577  27) The Postgres team wants to keep PostgreSQL working on all of the
578      supported platforms.  We therefore ask you to let us know if you did
579      or did not get PostgreSQL to work on you system.  Please send a
580      mail message to pgsql-ports@postgresql.org telling us the following:
581        - The version of PostgreSQL (6.4, 6.3.2, beta 970703, etc.).
582        - Your operating system (i.e. RedHat v4.0 Linux v2.0.26).
583        - Your hardware (SPARC, i486, etc.).
584        - Did you compile, install and run the regression tests cleanly?
585          If not, what source code did you change (i.e. patches you
586          applied, changes you made, etc.), what tests failed, etc.
587          It is normal to get many warning when you compile.  You do
588          not need to report these.
589
590  28) Now create, access and manipulate databases as desired.  Write client
591      programs to access the database server.  In other words, ENJOY!
592
593
594 PLAYING WITH POSTGRESQL
595 -----------------------
596
597 After PostgreSQL is installed, a database system is created, a postmaster
598 daemon is running, and the regression tests have passed, you'll want to 
599 see PostgreSQL do something.  That's easy.  Invoke the interactive interface
600 to PostgreSQL, psql, and start typing SQL:
601
602   $ psql template1
603
604 (psql has to open a particular database, but at this point the only one
605 that exists is the template1 database, which always exists.  We will connect
606 to it only long enough to create another one and switch to it).
607
608 The response from psql is:
609
610   type \? for help on slash commands
611   type \q to quit
612   type \g or terminate with semicolon to execute query
613 You are currently connected to the database: template1
614
615 template1=> 
616
617 Create the database foo:
618
619 template1=> CREATE DATABASE FOO;
620 INSERT 773248
621
622 (Get in the habit of including those SQL semicolons.  Psql won't execute
623 anything until it sees the semicolon or a "\g" and the semicolon is required
624 to delimit multiple statements.)
625
626 template1=> \c foo
627 closing connection to database: template1
628 connecting to new database: foo
629
630 (\ commands aren't SQL, so no semicolon.  Use \? to see all the \ commands.)
631
632 foo=> CREATE TABLE bar (column1 int4, column2 char16);
633 CREATE
634
635 foo=> \d bar
636
637 ...
638
639 You get the idea.
640
641
642 QUESTIONS?  BUGS?  FEEDBACK?
643 ----------------------------
644
645 First, read the files in directory /usr/src/pgsql/doc.  The FAQ in
646 this directory may be particularly useful.
647
648 If PostgreSQL failed to compile on your computer then fill out the form
649 in file /usr/src/pgsql/doc/bug.template and mail it to the location
650 indicated at the top of the form.
651
652 Mail questions to pgsql-questions@postgresql.org.  For more information
653 on the various mailing lists, see http://www.postgresql.org under mailing
654 lists.
655
656
657 ----------------------------------------------------------------------
658
659 Porting Notes (these notes may be out of date):
660 -------------
661
662 Ultrix4.x:
663         You need to install the libdl-1.1 package since Ultrix 4.x doesn't
664         have a dynamic loader. It's available in
665            s2k-ftp.CS.Berkeley.EDU:pub/personal/andrew/libdl-1.1.tar.Z
666
667 Linux:
668         A linux-2.0.30/libc-5.3.12/RedHat-4.2 running on a dual processor
669         i686 is the regression testing reference machine.
670         The linux-elf port installs cleanly. If you are using an
671         i486 processor or higher, you can edit template/linux-elf
672         to include "-m486" as a compiler option. configure does not
673         detect that sigsetjmp() is available, but you can edit
674         include/config.h after running configure and before running
675         make to include "#define HAVE_SIGSETJMP 1". Note that I have
676         not seen any difference in PostgreSQL behavior either way.
677                                 (Thomas G. Lockhart
678                                 <lockhart@alumni.caltech.edu> 97/10/14)
679
680         For non-ELF Linux, the dld library MUST be obtained and installed on
681         the system. It enables dynamic link loading capability to the Postgres
682         port. The dld library can be obtained from the sunsite linux
683         distributions. The current name is dld-3.2.5.
684                                 (Jalon Q. Zimmerman
685                                 <sneaker@powergrid.electriciti.com> 5/11/95)
686
687 BSD/OS:
688         For BSD/OS 2.0 and 2.01, you will need to get the GNU dld library.
689
690 NeXT:
691         The NeXT port was supplied by Tom R. Hageman <tom@basil.icce.rug.nl>.
692         It requires a SysV IPC emulation library and header files for
693         shared libary and semaphore stuff.   Tom just happens to sell such
694         a product so contact him for information.  He has also indicated that
695         binary releases of PostgreSQL for NEXTSTEP will be made available to
696         the general public.  Contact Info@RnA.nl for information.
697