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

Commit 189c348

Browse files
committed
Updates from Ian Barwick.
1 parent 24af792 commit 189c348

File tree

2 files changed

+46
-55
lines changed

2 files changed

+46
-55
lines changed

doc/FAQ

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Frequently Asked Questions (FAQ) for PostgreSQL
33

4-
Last updated: Sat Oct 19 22:58:02 EDT 2002
4+
Last updated: Sun Oct 20 20:47:14 EDT 2002
55

66
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
77

@@ -339,7 +339,7 @@
339339
the Features section above. We are built for reliability and
340340
features, though we continue to improve performance in every
341341
release. There is an interesting Web page comparing PostgreSQL
342-
to MySQL at http://openacs.org/why-not-mysql.html
342+
to MySQL at http://openacs.org/philosophy/why-not-mysql.html
343343

344344
Reliability
345345
We realize that a DBMS must be reliable, or it is worthless. We
@@ -596,12 +596,12 @@
596596
was 64, and changing it required a rebuild after altering the
597597
MaxBackendId constant in include/storage/sinvaladt.h.
598598

599-
3.9) What are the pgsql_tmp directory?
599+
3.9) What is in the pgsql_tmp directory?
600600

601-
They are temporary files generated by the query executor. For example,
602-
if a sort needs to be done to satisfy an ORDER BY, and the sort
603-
requires more space than the backend's -S parameter allows, then
604-
temporary files are created to hold the extra data.
601+
This directory contains temporary files generated by the query
602+
executor. For example, if a sort needs to be done to satisfy an ORDER
603+
BY and the sort requires more space than the backend's -S parameter
604+
allows, then temporary files are created here to hold the extra data.
605605

606606
The temporary files are usually deleted automatically, but might
607607
remain if a backend crashes during a sort. A stop and restart of the
@@ -758,19 +758,16 @@
758758
When using wild-card operators such as LIKE or ~, indexes can only be
759759
used in certain circumstances:
760760
* The beginning of the search string must be anchored to the start
761-
of the string, i.e.:
761+
of the string, i.e.
762+
+ LIKE patterns must not start with %.
763+
+ ~ (regular expression) patterns must start with ^.
764+
* The search string can not start with a character class, e.g.
765+
[a-e].
766+
* Case-insensitive searches such as ILIKE and ~* do not utilise
767+
indexes. Instead, use functional indexes, which are described in
768+
section 4.12.
769+
* The default C locale must be used during initdb.
762770

763-
* LIKE patterns must not start with %.
764-
* ~ (regular expression) patterns must start with ^.
765-
766-
The search string can not start with a character class, e.g. [a-e].
767-
768-
Case-insensitive searches such as ILIKE and ~* do not utilise
769-
indexes. Instead, use functional indexes, which are described in
770-
section 4.12.
771-
772-
The default C locale must be used during initdb.
773-
774771
4.9) How do I see how the query optimizer is evaluating my query?
775772

776773
See the EXPLAIN manual page.
@@ -1057,7 +1054,7 @@ CREATE TABLE test (x int, modtime timestamp DEFAULT CURRENT_TIMESTAMP );
10571054
Because PostgreSQL loads database-specific system catalogs, it is
10581055
uncertain how a cross-database query should even behave.
10591056

1060-
/contrib/dblink allows cross-database queries using function calls. Of
1057+
contrib/dblink allows cross-database queries using function calls. Of
10611058
course, a client can make simultaneous connections to different
10621059
databases and merge the results on the client side.
10631060

@@ -1089,8 +1086,8 @@ CREATE TABLE test (x int, modtime timestamp DEFAULT CURRENT_TIMESTAMP );
10891086

10901087
4.28) What encryption options are available?
10911088

1092-
* /contrib/pgcrypto contains many encryption functions for use in
1093-
SQL queries.
1089+
* contrib/pgcrypto contains many encryption functions for use in SQL
1090+
queries.
10941091
* The only way to encrypt transmission from the client to the server
10951092
is by using hostssl in pg_hba.conf.
10961093
* Database user passwords are automatically encrypted when stored in

doc/src/FAQ/FAQ.html

Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
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"
1410
alink="#0000ff">
1511
<H1>Frequently Asked Questions (FAQ) for PostgreSQL</H1>
1612

17-
<P>Last updated: Sat Oct 19 22:58:02 EDT 2002</P>
13+
<P>Last updated: Sun Oct 20 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 query executor. 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>

0 commit comments

Comments
 (0)