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

Commit daaf999

Browse files
committed
Improvements to Ian Barwick patch.
1 parent 0896707 commit daaf999

File tree

2 files changed

+49
-46
lines changed

2 files changed

+49
-46
lines changed

doc/FAQ

Lines changed: 18 additions & 18 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: Sun Oct 13 22:49:56 EDT 2002
4+
Last updated: Sun Oct 13 23:15:09 EDT 2002
55

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

@@ -52,7 +52,7 @@
5252
3.6) How do I tune the database engine for better performance?
5353
3.7) What debugging features are available?
5454
3.8) Why do I get "Sorry, too many clients" when trying to connect?
55-
3.9) What are the pg_sorttempNNN.NN files in my database directory?
55+
3.9) What is in the pgsql_tmp directory?
5656
3.10) Why do I need to do a dump and restore to upgrade PostgreSQL
5757
releases?
5858

@@ -197,8 +197,7 @@
197197
distribution or the MS Windows FAQ at
198198
http://www.PostgreSQL.org/docs/faq-mswin.html.
199199

200-
A native port to some Microsoft platforms is currently being worked
201-
upon.
200+
A native port to MS Win NT/2000/XP is currently being worked on.
202201

203202
1.5) Where can I get PostgreSQL?
204203

@@ -368,7 +367,7 @@
368367
1.15) How can I financially assist PostgreSQL?
369368

370369
PostgreSQL has had a first-class infrastructure since we started in
371-
1994. This is all thanks to Marc Fournier, who has created and managed
370+
1996. This is all thanks to Marc Fournier, who has created and managed
372371
this infrastructure over the years.
373372

374373
Quality infrastructure is very important to an open-source project. It
@@ -419,9 +418,9 @@
419418
2.3) Does PostgreSQL have a graphical user interface? A report generator?
420419
An embedded query language interface?
421420

422-
We have a nice graphical user interface called PgAccess, which is
423-
shipped as part of the distribution. PgAccess also has a report
424-
generator. The Web page is http://www.pgaccess.org/.
421+
We have a nice graphical user interface called PgAccess which can also
422+
be used as a report generator. The Web page is
423+
http://www.pgaccess.org/.
425424

426425
We also include ecpg, which is an embedded SQL query language
427426
interface for C.
@@ -433,15 +432,16 @@
433432
* C++ (libpq++)
434433
* Embedded C (ecpg)
435434
* Java (jdbc)
436-
* Perl (DBD::Pg)
435+
* Perl (DBD::Pg and perl5)
437436
* ODBC (odbc)
438437
* Python (PyGreSQL)
439438
* TCL (libpgtcl)
440439
* C Easy API (libpgeasy)
441440
* PHP ('pg_' functions, Pear::DB)
442441

443442
Additional interfaces are available at
444-
http://www.PostgreSQL.org/interfaces.html.
443+
http://www.PostgreSQL.org/interfaces.html and
444+
http://gborg.PostgreSQL.org.
445445
_________________________________________________________________
446446

447447
Administrative Questions
@@ -596,16 +596,16 @@
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 pg_tempNNN.NN files in my database directory?
599+
3.9) What are the pgsql_tmp directory?
600600

601601
They are temporary files generated by the query executor. For example,
602602
if a sort needs to be done to satisfy an ORDER BY, and the sort
603603
requires more space than the backend's -S parameter allows, then
604604
temporary files are created to hold the extra data.
605605

606-
The temporary files should be deleted automatically, but might not if
607-
a backend crashes during a sort. If you have no backends running at
608-
the time, it is safe to delete the pg_tempNNN.NN files.
606+
The temporary files are usually deleted automatically, but might
607+
remain if a backend crashes during a sort. A stop and restart of the
608+
postmaster will remove files from those directories.
609609

610610
3.10) Why do I need to do a dump and restore to upgrade between major
611611
PostgreSQL releases?
@@ -649,8 +649,8 @@
649649

650650
4.4) How do you remove a column from a table?
651651

652-
Prior to version 7.3, ALTER TABLE DROP COLUMN is not supported. You
653-
can do this instead:
652+
This functionality was added in release 7.3 with ALTER TABLE DROP
653+
COLUMN. In earlier versions, you can do this:
654654
BEGIN;
655655
LOCK TABLE old_table;
656656
SELECT ... -- select all columns but the one you want to remove
@@ -815,11 +815,11 @@
815815
Case-insensitive equality comparisons are normally expressed as:
816816
SELECT *
817817
FROM tab
818-
WHERE LOWER(col) = 'abc';
818+
WHERE lower(col) = 'abc';
819819

820820
This will not use an standard index. However, if you create a
821821
functional index, it will be used:
822-
CREATE INDEX tabindex ON tab (LOWER(col));
822+
CREATE INDEX tabindex ON tab (lower(col));
823823

824824
4.13) In a query, how do I detect if a field is NULL?
825825

doc/src/FAQ/FAQ.html

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
alink="#0000ff">
1515
<H1>Frequently Asked Questions (FAQ) for PostgreSQL</H1>
1616

17-
<P>Last updated: Sun Oct 13 22:49:56 EDT 2002</P>
17+
<P>Last updated: Sun Oct 13 23:15:09 EDT 2002</P>
1818

1919
<P>Current maintainer: Bruce Momjian (<A href=
2020
"mailto:pgman@candle.pha.pa.us">pgman@candle.pha.pa.us</A>)<BR>
@@ -78,8 +78,8 @@ <H2 align="center">Administrative Questions</H2>
7878
<A href="#3.7">3.7</A>) What debugging features are available?<BR>
7979
<A href="#3.8">3.8</A>) Why do I get <I>"Sorry, too many
8080
clients"</I> when trying to connect?<BR>
81-
<A href="#3.9">3.9</A>) What are the <I>pg_sorttempNNN.NN</I>
82-
files in my database directory?<BR>
81+
<A href="#3.9">3.9</A>) What is in the <I>pgsql_tmp</I>
82+
directory?<BR>
8383
<A href="#3.10">3.10</A>) Why do I need to do a dump and restore
8484
to upgrade PostgreSQL releases?<BR>
8585

@@ -250,10 +250,11 @@ <H4><A name="1.4">1.4</A>) What non-Unix ports are available?</H4>
250250
<P>The database server can run on Windows NT and Win2k using
251251
Cygwin, the Cygnus Unix/NT porting library. See
252252
<I>pgsql/doc/FAQ_MSWIN</I> in the distribution or the MS Windows FAQ
253-
at <A href="http://www.PostgreSQL.org/docs/faq-mswin.html">http://www.PostgreSQL.org/docs/faq-mswin.html</A>.</P>
253+
at <A href="http://www.PostgreSQL.org/docs/faq-mswin.html">
254+
http://www.PostgreSQL.org/docs/faq-mswin.html</A>.</P>
254255

255-
<p>A native port to some Microsoft platforms is currently being worked
256-
upon.</p>
256+
<p>A native port to MS Win NT/2000/XP is currently being worked
257+
on.</p>
257258

258259
<H4><A name="1.5">1.5</A>) Where can I get PostgreSQL?</H4>
259260

@@ -484,7 +485,7 @@ <H4><A name="1.15">1.15</A>) How can I financially assist
484485
PostgreSQL?</H4>
485486

486487
<P>PostgreSQL has had a first-class infrastructure since we started
487-
in 1994. This is all thanks to Marc Fournier, who has created
488+
in 1996. This is all thanks to Marc Fournier, who has created
488489
and managed this infrastructure over the years.</P>
489490

490491
<P>Quality infrastructure is very important to an open-source
@@ -545,9 +546,9 @@ <H4><A name="2.3">2.3</A>) Does PostgreSQL have a graphical user
545546
interface? A report generator? An embedded query language
546547
interface?</H4>
547548

548-
<P>We have a nice graphical user interface called PgAccess, which is
549-
shipped as part of the distribution. PgAccess also has a report
550-
generator. The Web page is <A href="http://www.pgaccess.org/">http://www.pgaccess.org/</A>.</P>
549+
<P>We have a nice graphical user interface called PgAccess which can
550+
also be used as a report generator. The Web page is
551+
<A href="http://www.pgaccess.org/">http://www.pgaccess.org/</A>.</P>
551552

552553
<P>We also include <I>ecpg</I>, which is an embedded SQL query
553554
language interface for C.</P>
@@ -565,7 +566,7 @@ <H4><A name="2.4">2.4</A>) What languages are able to communicate with PostgreSQ
565566

566567
<LI>Java (jdbc)</LI>
567568

568-
<LI>Perl (DBD::Pg)</LI>
569+
<LI>Perl (DBD::Pg and perl5)</LI>
569570

570571
<LI>ODBC (odbc)</LI>
571572

@@ -578,7 +579,9 @@ <H4><A name="2.4">2.4</A>) What languages are able to communicate with PostgreSQ
578579
<LI>PHP ('pg_' functions, Pear::DB)</LI>
579580
</UL>
580581
<P>Additional interfaces are available at
581-
<a href="http://www.PostgreSQL.org/interfaces.html">http://www.PostgreSQL.org/interfaces.html</A>.
582+
<a href="http://www.PostgreSQL.org/interfaces.html">http://www.PostgreSQL.org/interfaces.html</A>
583+
and
584+
<a href="http://gborg.PostgreSQL.org">http://gborg.PostgreSQL.org</A>.
582585
</P>
583586
<HR>
584587

@@ -765,19 +768,18 @@ <H4><A name="3.8">3.8</A>) Why do I get <I>"Sorry, too many
765768
the MaxBackendId constant in
766769
<I>include/storage/sinvaladt.h</I>.</P>
767770

768-
<H4><A name="3.9">3.9</A>) What are the <I>pg_tempNNN.NN</I>
769-
files in my database directory?</H4>
771+
<H4><A name="3.9">3.9</A>) What are the <I>pgsql_tmp</I>
772+
directory?</H4>
770773

771774
<P>They are temporary files generated by the query executor. For
772775
example, if a sort needs to be done to satisfy an <SMALL>ORDER
773776
BY,</SMALL> and the sort requires more space than the backend's
774777
<I>-S</I> parameter allows, then temporary files are created to
775778
hold the extra data.</P>
776779

777-
<P>The temporary files should be deleted automatically, but might
778-
not if a backend crashes during a sort. If you have no backends
779-
running at the time, it is safe to delete the pg_tempNNN.NN
780-
files.</P>
780+
<P>The temporary files are usually deleted automatically, but might
781+
remain if a backend crashes during a sort. A stop and restart of the
782+
<I>postmaster</I> will remove files from those directories.</P>
781783

782784
<H4><A name="3.10">3.10</A>) Why do I need to do a dump and restore
783785
to upgrade between major PostgreSQL releases?</H4>
@@ -790,10 +792,10 @@ <H4><A name="3.10">3.10</A>) Why do I need to do a dump and restore
790792
data in a generic format that can then be loaded in using the new internal
791793
format.</P>
792794

793-
<p>In releases where the on-disk format does not change, the
794-
<i>pg_upgrade</i> script can be used to upgrade without a dump/restore.
795-
The release notes mention whether <i>pg_upgrade</i> is available for the
796-
release.</p>
795+
<P>In releases where the on-disk format does not change, the
796+
<I>pg_upgrade</I> script can be used to upgrade without a dump/restore.
797+
The release notes mention whether <I>pg_upgrade</I> is available for the
798+
release.</P>
797799

798800
<HR>
799801

@@ -831,8 +833,9 @@ <H4><A name="4.3">4.3</A>) How do I get a list of tables or other
831833
<H4><A name="4.4">4.4</A>) How do you remove a column from a
832834
table?</H4>
833835

834-
<P>Prior to version 7.3, <SMALL>ALTER TABLE DROP COLUMN</SMALL> is not supported.
835-
You can do this instead:</P>
836+
<P>This functionality was added in release 7.3 with
837+
<SMALL>ALTER TABLE DROP COLUMN</SMALL>. In earlier versions,
838+
you can do this:</P>
836839
<PRE>
837840
BEGIN;
838841
LOCK TABLE old_table;
@@ -1023,13 +1026,13 @@ <H4><A name="4.12">4.12</A>) How do I perform regular expression
10231026
<PRE>
10241027
SELECT *
10251028
FROM tab
1026-
WHERE LOWER(col) = 'abc';
1029+
WHERE lower(col) = 'abc';
10271030
</PRE>
10281031

10291032
This will not use an standard index. However, if you create a
10301033
functional index, it will be used:
10311034
<PRE>
1032-
CREATE INDEX tabindex ON tab (LOWER(col));
1035+
CREATE INDEX tabindex ON tab (lower(col));
10331036
</PRE>
10341037

10351038
<H4><A name="4.13">4.13</A>) In a query, how do I detect if a field
@@ -1118,7 +1121,7 @@ <H4><A name="4.15.2">4.15.2</A>) How do I get the value of a
11181121
and your <SMALL>SERIAL</SMALL> column, respectively.
11191122

11201123
<P>Alternatively, you could retrieve the assigned
1121-
<SMALL>SERIAL</SMALL> value with the <I>currval</I>() function
1124+
<SMALL>SERIAL</SMALL> value with the <I>currval()</I> function
11221125
<I>after</I> it was inserted by default, e.g.,</P>
11231126
<PRE>
11241127
execute("INSERT INTO person (name) VALUES ('Blaise Pascal')");
@@ -1135,7 +1138,7 @@ <H4><A name="4.15.2">4.15.2</A>) How do I get the value of a
11351138
<H4><A name="4.15.3">4.15.3</A>) Don't <I>currval()</I> and
11361139
<I>nextval()</I> lead to a race condition with other users?</H4>
11371140

1138-
<P>No. <i>currval</i>() returns the current value assigned by your
1141+
<P>No. <I>currval()</I> returns the current value assigned by your
11391142
backend, not by all users.</P>
11401143

11411144
<H4><A name="4.15.4">4.15.4</A>) Why aren't my sequence numbers

0 commit comments

Comments
 (0)