1- <!DOCTYPE html PUBLIC "-//W3C//DTD html 4.01 transitional//EN">
2-
1+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
32< HTML >
4- <!-- DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN" -->
5- <!-- HTML -->
6-
73< HEAD >
84< META name ="generator "content ="HTML Tidy, see www.w3.org ">
9-
5+ < META http-equiv =" Content-Type " content =" text/html; charset=US-ASCII " >
106< TITLE > PostgreSQL FAQ</ TITLE >
117</ HEAD >
128
139< BODY bgcolor ="#ffffff "text ="#000000 "link ="#ff0000 "vlink ="#a00000 "
1410alink ="#0000ff ">
1511< H1 > Frequently Asked Questions (FAQ) for PostgreSQL</ H1 >
1612
17- < P > Last updated:Sat Oct19 22:58:02 EDT 2002</ P >
13+ < P > Last updated:Sun Oct20 20:47:14 EDT 2002</ P >
1814
1915< P > Current maintainer: Bruce Momjian (< A href =
2016 "mailto:pgman@candle.pha.pa.us "> pgman@candle.pha.pa.us</ A > )< BR >
@@ -80,9 +76,9 @@ <H2 align="center">Administrative Questions</H2>
8076 clients"</ I > when trying to connect?< BR >
8177< A href ="#3.9 "> 3.9</ A > ) What is in the< I > pgsql_tmp</ I >
8278 directory?< BR >
83- < A href ="#3.10 "> 3.10</ A > ) Why do I need to do a dump and restore
79+ < A href ="#3.10 "> 3.10</ A > ) Why do I need to do a dump and restore
8480 to upgrade PostgreSQL releases?< BR >
85-
81+
8682
8783< H2 align ="center "> Operational Questions</ H2 >
8884< A href ="#4.1 "> 4.1</ A > ) What is the difference between binary
@@ -440,9 +436,8 @@ <H4><A name="1.14">1.14</A>) How does PostgreSQL compare to other
440436< I > Features</ I > section above. We are built for reliability and
441437 features, though we continue to improve performance in every
442438 release. There is an interesting Web page comparing PostgreSQL to
443- MySQL at< A href = "http://openacs.org/why-not-mysql.html ">
444-
445- http://openacs.org/why-not-mysql.html</ A > < BR >
439+ MySQL at< A href ="http://openacs.org/philosophy/why-not-mysql.html ">
440+ http://openacs.org/philosophy/why-not-mysql.html</ A > < BR >
446441
447442< BR >
448443</ DD >
@@ -653,7 +648,7 @@ <H4><A name="3.6">3.6</A>) How do I tune the database engine for
653648
654649< P > If you are doing many< SMALL > INSERTs</ SMALL > , consider doing
655650 them in a large batch using the< SMALL > COPY</ SMALL > command. This
656- is much faster than individual< SMALL > INSERTS. </ SMALL > Second,
651+ is much faster than individual< SMALL > INSERTS</ SMALL > . Second,
657652 statements not in a< SMALL > BEGIN WORK/COMMIT</ SMALL > transaction
658653 block are considered to be in their own transaction. Consider
659654 performing several statements in a single transaction block. This
@@ -721,7 +716,7 @@ <H4><A name="3.7">3.7</A>) What debugging features are
721716< P > If< I > postmaster</ I > is running, start< I > psql</ I > in one
722717 window, then find the< SMALL > PID</ SMALL > of the< I > postgres</ I >
723718 process used by< I > psql</ I > . Use a debugger to attach to the
724- < I > postgres</ I > < SMALL > PID. </ SMALL > You can set breakpoints in the
719+ < I > postgres</ I > < SMALL > PID</ SMALL > . You can set breakpoints in the
725720 debugger and issue queries from< I > psql</ I > . If you are debugging
726721< I > postgres</ I > startup, you can set PGOPTIONS="-W n", then start
727722< I > psql</ I > . This will cause startup to delay for< I > n</ I > seconds
@@ -759,7 +754,7 @@ <H4><A name="3.8">3.8</A>) Why do I get <I>"Sorry, too many
759754 maximum number of processes,< SMALL > NPROC;</ SMALL > the maximum
760755 number of processes per user,< SMALL > MAXUPRC;</ SMALL > and the
761756 maximum number of open files,< SMALL > NFILE</ SMALL > and
762- < SMALL > NINODE. </ SMALL > The reason that PostgreSQL has a limit on
757+ < SMALL > NINODE</ SMALL > . The reason that PostgreSQL has a limit on
763758 the number of allowed backend processes is so your system won't run
764759 out of resources.</ P >
765760
@@ -768,14 +763,13 @@ <H4><A name="3.8">3.8</A>) Why do I get <I>"Sorry, too many
768763 the MaxBackendId constant in
769764< I > include/storage/sinvaladt.h</ I > .</ P >
770765
771- < H4 > < A name ="3.9 "> 3.9</ A > ) What are the< I > pgsql_tmp</ I >
772- directory?</ H4 >
766+ < H4 > < A name ="3.9 "> 3.9</ A > ) What is in the< I > pgsql_tmp</ I > directory?</ H4 >
773767
774- < P > They are temporary files generated by the queryexecutor. For
775- example, if a sort needs to be done to satisfy an< SMALL > ORDER
776- BY, </ SMALL > and the sort requires more space than the backend's
777- < I > -S</ I > parameter allows, then temporary files are created to
778- hold the extra data.</ P >
768+ < P > This directory contains temporary files generated by the query
769+ executor. For example, if a sort needs to be done to satisfy an
770+ < SMALL > ORDER BY </ SMALL > and the sort requires more space than the
771+ backend's < I > -S</ I > parameter allows, then temporary files are created
772+ here to hold the extra data.</ P >
779773
780774< P > The temporary files are usually deleted automatically, but might
781775 remain if a backend crashes during a sort. A stop and restart of the
@@ -815,7 +809,7 @@ <H4><A name="4.2">4.2</A>) How do I <SMALL>SELECT</SMALL> only the
815809
816810< P > The entire query may have to be evaluated, even if you only want
817811 the first few rows. Consider using a query that has an< SMALL > ORDER
818- BY. </ SMALL > If there is an index that matches the< SMALL > ORDER
812+ BY</ SMALL > . If there is an index that matches the< SMALL > ORDER
819813 BY</ SMALL > , PostgreSQL may be able to evaluate only the first few
820814 records requested, or the entire query may have to be evaluated
821815 until the desired rows have been generated.</ P >
@@ -955,22 +949,22 @@ <H4><A name="4.8">4.8</A>) My queries are slow or don't make use of
955949</ PRE >
956950
957951< P > When using wild-card operators such as< SMALL > LIKE</ SMALL > or
958- < I > ~</ I > , indexes can only be used in certain circumstances:
952+ < I > ~</ I > , indexes can only be used in certain circumstances:</ P >
959953< UL >
960954< LI > The beginning of the search string must be anchored to the start
961- of the string, i.e.: </ LI >
955+ of the string, i.e.
962956< UL >
963- < LI > < SMALL > LIKE</ SMALL > patterns must not start with< I > %. </ I > </ LI >
957+ < LI > < SMALL > LIKE</ SMALL > patterns must not start with< I > %</ I > . </ LI >
964958< LI > < I > ~</ I > (regular expression) patterns must start with
965- < I > ^. </ I > </ LI >
966- </ UL >
959+ < I > ^</ I > . </ LI >
960+ </ UL > </ LI >
967961< LI > The search string can not start with a character class,
968962 e.g. [a-e].</ LI >
969963< LI > Case-insensitive searches such as< SMALL > ILIKE</ SMALL > and
970964< I > ~*</ I > do not utilise indexes. Instead, use functional
971965 indexes, which are described in section< a href ="#4.12 "> 4.12</ a > .</ LI >
972966< LI > The default< I > C</ I > locale must be used during
973- < i > initdb. </ i > </ LI >
967+ < i > initdb</ i > . </ LI >
974968</ UL >
975969< P >
976970
@@ -1342,7 +1336,7 @@ <H4><A name="4.24">4.24</A>) How do I perform queries using
13421336 Because PostgreSQL loads database-specific system catalogs, it is
13431337 uncertain how a cross-database query should even behave.</ P >
13441338
1345- < P > < I > / contrib/dblink</ I > allows cross-database queries using
1339+ < P > < I > contrib/dblink</ I > allows cross-database queries using
13461340 function calls. Of course, a client can make simultaneous
13471341 connections to different databases and merge the results on the
13481342 client side.</ P >
@@ -1379,13 +1373,13 @@ <H4><A name="4.27">4.27</A>) What replication options are available?
13791373< H4 > < A name ="4.28 "> 4.28</ A > ) What encryption options are available?
13801374</ H4 >
13811375< UL >
1382- < LI > < I > / contrib/pgcrypto</ I > contains many encryption functions for
1376+ < LI > < I > contrib/pgcrypto</ I > contains many encryption functions for
13831377 use in< SMALL > SQL</ SMALL > queries.</ LI >
13841378< LI > The only way to encrypt transmission from the client to the
13851379 server is by using< I > hostssl</ I > in< I > pg_hba.conf</ I > .</ LI >
13861380< LI > Database user passwords are automatically encrypted when stored
13871381 in version 7.3. In previous versions, you must enable the option
1388- < i > PASSWORD_ENCRYPTION</ i > in< i > postgresql.conf</ i > .</ LI >
1382+ < I > PASSWORD_ENCRYPTION</ I > in< I > postgresql.conf</ I > .</ LI >
13891383< LI > The server can run using an encrypted file system.</ LI >
13901384</ UL >
13911385
@@ -1413,7 +1407,7 @@ <H4><A name="5.3">5.3</A>) How do I write a C function to return a
14131407 functions are fully supported in C, PL/PgSQL, and SQL. See the
14141408 Programmer's Guide for more information. An example of a
14151409 table-returning function defined in C can be found in
1416- contrib/tablefunc.</ P >
1410+ < I > contrib/tablefunc</ I > .</ P >
14171411
14181412< H4 > < A name ="5.4 "> 5.4</ A > ) I have changed a source file. Why does
14191413 the recompile not see the change?</ H4 >