Improvements to Ian Barwick patch.
authorBruce Momjian
Mon, 14 Oct 2002 03:15:33 +0000 (03:15 +0000)
committerBruce Momjian
Mon, 14 Oct 2002 03:15:33 +0000 (03:15 +0000)
doc/FAQ
doc/src/FAQ/FAQ.html

diff --git a/doc/FAQ b/doc/FAQ
index 9092c0a49af88f905924e418ddc0f5a42eb6d814..56d907042dd73d0da39480862c83f32ad3935c6f 100644 (file)
--- a/doc/FAQ
+++ b/doc/FAQ
@@ -1,7 +1,7 @@
 
                 Frequently Asked Questions (FAQ) for PostgreSQL
                                        
-   Last updated: Sun Oct 13 22:49:56 EDT 2002
+   Last updated: Sun Oct 13 23:15:09 EDT 2002
    
    Current maintainer: Bruce Momjian ([email protected])
    
@@ -52,7 +52,7 @@
    3.6) How do I tune the database engine for better performance?
    3.7) What debugging features are available?
    3.8) Why do I get "Sorry, too many clients" when trying to connect?
-   3.9) What are the pg_sorttempNNN.NN files in my database directory?
+   3.9) What is in the pgsql_tmp directory?
    3.10) Why do I need to do a dump and restore to upgrade PostgreSQL
    releases?
    
    distribution or the MS Windows FAQ at
    http://www.PostgreSQL.org/docs/faq-mswin.html.
    
-   A native port to some Microsoft platforms is currently being worked
-   upon.
+   A native port to MS Win NT/2000/XP is currently being worked on.
    
     1.5) Where can I get PostgreSQL?
     
     1.15) How can I financially assist PostgreSQL?
     
    PostgreSQL has had a first-class infrastructure since we started in
-   1994. This is all thanks to Marc Fournier, who has created and managed
+   1996. This is all thanks to Marc Fournier, who has created and managed
    this infrastructure over the years.
    
    Quality infrastructure is very important to an open-source project. It
     2.3) Does PostgreSQL have a graphical user interface? A report generator?
     An embedded query language interface?
     
-   We have a nice graphical user interface called PgAccess, which is
-   shipped as part of the distribution. PgAccess also has a report
-   generator. The Web page is http://www.pgaccess.org/.
+   We have a nice graphical user interface called PgAccess which can also
+   be used as a report generator. The Web page is
+   http://www.pgaccess.org/.
    
    We also include ecpg, which is an embedded SQL query language
    interface for C.
      * C++ (libpq++)
      * Embedded C (ecpg)
      * Java (jdbc)
-     * Perl (DBD::Pg)
+     * Perl (DBD::Pg and perl5)
      * ODBC (odbc)
      * Python (PyGreSQL)
      * TCL (libpgtcl)
      * PHP ('pg_' functions, Pear::DB)
        
    Additional interfaces are available at
-   http://www.PostgreSQL.org/interfaces.html.
+   http://www.PostgreSQL.org/interfaces.html and
+   http://gborg.PostgreSQL.org.
      _________________________________________________________________
    
                           Administrative Questions
    was 64, and changing it required a rebuild after altering the
    MaxBackendId constant in include/storage/sinvaladt.h.
    
-    3.9) What are the pg_tempNNN.NN files in my database directory?
+    3.9) What are the pgsql_tmp directory?
     
    They are temporary files generated by the query executor. For example,
    if a sort needs to be done to satisfy an ORDER BY, and the sort
    requires more space than the backend's -S parameter allows, then
    temporary files are created to hold the extra data.
    
-   The temporary files should be deleted automatically, but might not if
-   a backend crashes during a sort. If you have no backends running at
-   the time, it is safe to delete the pg_tempNNN.NN files.
+   The temporary files are usually deleted automatically, but might
+   remain if a backend crashes during a sort. A stop and restart of the
+   postmaster will remove files from those directories.
    
     3.10) Why do I need to do a dump and restore to upgrade between major
     PostgreSQL releases?
    
     4.4) How do you remove a column from a table?
     
-   Prior to version 7.3, ALTER TABLE DROP COLUMN is not supported. You
-   can do this instead:
+   This functionality was added in release 7.3 with ALTER TABLE DROP
+   COLUMN. In earlier versions, you can do this:
     BEGIN;
     LOCK TABLE old_table;
     SELECT ...  -- select all columns but the one you want to remove
    Case-insensitive equality comparisons are normally expressed as:
     SELECT *
     FROM tab
-    WHERE LOWER(col) = 'abc';
+    WHERE lower(col) = 'abc';
 
    This will not use an standard index. However, if you create a
    functional index, it will be used:
-    CREATE INDEX tabindex ON tab (LOWER(col));
+    CREATE INDEX tabindex ON tab (lower(col));
 
     4.13) In a query, how do I detect if a field is NULL?
     
index 042a4984ee4a6878355421fadf8adb10e386aea0..b8b24ccae02bf909a4f6502556e69a0da660eb4c 100644 (file)
@@ -14,7 +14,7 @@
   alink="#0000ff">
     

Frequently Asked Questions (FAQ) for PostgreSQL

 
-    

Last updated: Sun Oct 13 22:49:56 EDT 2002

+    

Last updated: Sun Oct 13 23:15:09 EDT 2002

 
     

Current maintainer: Bruce Momjian (

@@ -78,8 +78,8 @@
      3.7) What debugging features are available?
      3.8) Why do I get "Sorry, too many
     clients" when trying to connect?
-     3.9) What are the pg_sorttempNNN.NN
-    files in my database directory?
+     3.9) What is in the  pgsql_tmp
+    directory?
      3.10) Why do I need to do a dump and restore 
     to upgrade PostgreSQL releases?
      
     

The database server can run on Windows NT and Win2k using

     Cygwin, the Cygnus Unix/NT porting library. See
     pgsql/doc/FAQ_MSWIN in the distribution or the MS Windows FAQ
-    at http://www.PostgreSQL.org/docs/faq-mswin.html.

+    at 
+    http://www.PostgreSQL.org/docs/faq-mswin.html.

 
-    

A native port to some Microsoft platforms is currently being worked

-    upon.

+    

A native port to MS Win NT/2000/XP is currently being worked

+    on.

 
     

1.5) Where can I get PostgreSQL?

 
     PostgreSQL?
 
     

PostgreSQL has had a first-class infrastructure since we started

-    in 1994. This is all thanks to Marc Fournier, who has created
+    in 1996. This is all thanks to Marc Fournier, who has created
     and managed this infrastructure over the years.

 
     

Quality infrastructure is very important to an open-source

     interface? A report generator? An embedded query language
     interface?
 
-    

We have a nice graphical user interface called PgAccess, which is

-    shipped as part of the distribution. PgAccess also has a report
-    generator. The Web page is http://www.pgaccess.org/.

+    

We have a nice graphical user interface called PgAccess which can

+    also be used as a report generator. The Web page is
+    http://www.pgaccess.org/.

 
     

We also include ecpg, which is an embedded SQL query

     language interface for C.

 
       
  • Java (jdbc)
  •  
    -      
  • Perl (DBD::Pg)
  • +      
  • Perl (DBD::Pg and perl5)
  •  
           
  • ODBC (odbc)
  •  
           
  • PHP ('pg_' functions, Pear::DB)
  •      
         

    Additional interfaces are available at 

    -    http://www.PostgreSQL.org/interfaces.html.
    +    http://www.PostgreSQL.org/interfaces.html
    +    and
    +    http://gborg.PostgreSQL.org.
         

         
     
         the MaxBackendId constant in
         include/storage/sinvaladt.h.

     
    -    

    3.9) What are the pg_tempNNN.NN

    -    files in my database directory?
    +    

    3.9) What are the pgsql_tmp

    +    directory?
     
         

    They are temporary files generated by the query executor. For

         example, if a sort needs to be done to satisfy an ORDER
         -S parameter allows, then temporary files are created to
         hold the extra data.

     
    -    

    The temporary files should be deleted automatically, but might

    -    not if a backend crashes during a sort. If you have no backends
    -    running at the time, it is safe to delete the pg_tempNNN.NN
    -    files.

    +    

    The temporary files are usually deleted automatically, but might

    +    remain if a backend crashes during a sort. A stop and restart of the
    +    postmaster will remove files from those directories.

     
         

    3.10) Why do I need to do a dump and restore

         to upgrade between major PostgreSQL releases?
         data in a generic format that can then be loaded in using the new internal
         format.

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

    4.4) How do you remove a column from a

         table?
     
    -    

    Prior to version 7.3, ALTER TABLE DROP COLUMN is not supported.

    -    You can do this instead:

    +    

    This functionality was added in release 7.3 with

    +    ALTER TABLE DROP COLUMN.  In earlier versions,
    +    you can do this:

     
         BEGIN;
         LOCK TABLE old_table;
     
         SELECT *
         FROM tab
    -    WHERE LOWER(col) = 'abc';
    +    WHERE lower(col) = 'abc';
     
     
         This will not use an standard index. However, if you create a
         functional index, it will be used: 
     
    -    CREATE INDEX tabindex ON tab (LOWER(col));
    +    CREATE INDEX tabindex ON tab (lower(col));
     
     
         

    4.13) In a query, how do I detect if a field

    @@ -1118,7 +1121,7 @@ BYTEA           bytea           variable-length byte array (null-byte safe)
         and your SERIAL column, respectively.
     
         

    Alternatively, you could retrieve the assigned

    -    SERIAL value with the currval() function
    +    SERIAL value with the currval() function
         after it was inserted by default, e.g.,

     
         execute("INSERT INTO person (name) VALUES ('Blaise Pascal')");
    @@ -1135,7 +1138,7 @@ BYTEA           bytea           variable-length byte array (null-byte safe)
         

    4.15.3) Don't currval() and

         nextval() lead to a race condition with other users?
     
    -    

    No. <i>currval() returns the current value assigned by your

    +    

    No. <I>currval() returns the current value assigned by your

         backend, not by all users.

     
         

    4.15.4) Why aren't my sequence numbers