Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id F327F475FF1 for ; Sun, 13 Oct 2002 23:15:10 -0400 (EDT) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by postgresql.org (Postfix) with ESMTP id 19F0F475EBC for ; Sun, 13 Oct 2002 23:15:07 -0400 (EDT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id g9E3F2p26080; Sun, 13 Oct 2002 23:15:02 -0400 (EDT) From: Bruce Momjian Message-Id: <200210140315.g9E3F2p26080@candle.pha.pa.us> Subject: Re: Minor FAQ correction suggestions In-Reply-To: <200210130544.34553.barwick@gmx.net> To: Ian Barwick Date: Sun, 13 Oct 2002 23:15:02 -0400 (EDT) Cc: pgsql-docs@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=ELM1034565302-16133-0_ Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/9 X-Sequence-Number: 1503 --ELM1034565302-16133-0_ Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Very nice. I applied the entire patch; it was all good. I made a few updates after applying your patch; patch attached. --------------------------------------------------------------------------- Ian Barwick wrote: > > I'm reworking the German version of the FAQ (which is > hopelessly outdated), in the course of which I've come across > a few errors in the original (English) version, > mainly minor things like spelling mistakes and broken links. > Patch with suggested corrections attached (German version will > follow ASAP). > > General alterations: > > Some links corrected; links to the domain "postgresql.org" now uniformly > written as "PostgreSQL.org". Minor tidying up of formatting. > > Some specific notes / questions on the following sections: > > 1.4) What non-Unix ports are available? > > -> win31.mak should be win32.mak > > Added: > "A native port to some Microsoft platforms is currently being worked > upon." > -> IIRC this is the case. Please correct if not. > > 1.8) What documentation is available? > The link http://www.PostgreSQL.org/books/ is broken, > http://www.ca.PostgreSQL.org/books/ works. (It would be more > logical to fix the link rather than the FAQ I think, though). > > 3.9) What are the pg_sorttempNNN.NN files in my database directory? > > -> presume this should read "What are the pg_tempNNN.NN files..." ?? > > 4.4) How do you remove a column from a table? > -> ALTER TABLE DROP COLUMN supported as of 7.3 :-) > > 4.15.2) How do I get the value of a SERIAL insert? > > -> Perl is a very versatile language, but this: > > new_id = output of "SELECT nextval('person_id_seq')" > INSERT INTO person (id, name) VALUES (new_id, 'Blaise Pascal'); > > is most definitely not Perl ;-). I have made up a pseudo-language for the > example. > > 4.16) What is an OID? What is a TID? > -> backend/access/transam.h should be include/access/transam.h > > 4.17) What is the meaning of some of the terms used in PostgreSQL? > > -> The link http://www.comptechnews.com/~reaster/dbdesign.html is broken > (the domain doesn't seem to exist). Suggest: > http://hea-www.harvard.edu/MST/simul/software/docs/pkgs/pgsql/glossary/glossary.html > as replacement. > > 4.25) How do I return multiple rows or columns from a function? > > -> Linked to current rather than developer documentation > > > Regards > > Ian Barwick > barwick@gmx.net [ Attachment, skipping... ] > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 --ELM1034565302-16133-0_ Content-Transfer-Encoding: 7bit Content-Type: text/plain Content-Disposition: inline; filename="/bjm/diff" Index: doc/src/FAQ/FAQ.html =================================================================== RCS file: /cvsroot/pgsql-server/doc/src/FAQ/FAQ.html,v retrieving revision 1.159 diff -c -c -r1.159 FAQ.html *** doc/src/FAQ/FAQ.html 14 Oct 2002 02:50:28 -0000 1.159 --- doc/src/FAQ/FAQ.html 14 Oct 2002 03:13:27 -0000 *************** *** 78,85 **** 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.10) Why do I need to do a dump and restore to upgrade PostgreSQL releases?
--- 78,85 ---- 3.7) What debugging features are available?
3.8) Why do I get "Sorry, too many clients" when trying to connect?
! 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?
*************** *** 250,259 ****

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.

!

A native port to some Microsoft platforms is currently being worked ! upon.

1.5) Where can I get PostgreSQL?

--- 250,260 ----

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.

!

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

1.5) Where can I get PostgreSQL?

*************** *** 484,490 **** 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 this infrastructure over the years.

Quality infrastructure is very important to an open-source --- 485,491 ---- PostgreSQL?

PostgreSQL has had a first-class infrastructure since we started ! 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 *************** *** 545,553 **** 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 also include ecpg, which is an embedded SQL query language interface for C.

--- 546,554 ---- interface? A report generator? An embedded query language interface? !

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.

*************** *** 565,571 ****
  • Java (jdbc)
  • !
  • Perl (DBD::Pg)
  • ODBC (odbc)
  • --- 566,572 ----
  • Java (jdbc)
  • !
  • Perl (DBD::Pg and perl5)
  • ODBC (odbc)
  • *************** *** 578,584 ****
  • PHP ('pg_' functions, Pear::DB)
  • Additional interfaces are available at ! http://www.PostgreSQL.org/interfaces.html.


    --- 579,587 ----
  • PHP ('pg_' functions, Pear::DB)
  • Additional interfaces are available at ! http://www.PostgreSQL.org/interfaces.html ! and ! http://gborg.PostgreSQL.org.


    *************** *** 765,772 **** the MaxBackendId constant in include/storage/sinvaladt.h.

    !

    3.9) What are the pg_tempNNN.NN ! files in my database directory?

    They are temporary files generated by the query executor. For example, if a sort needs to be done to satisfy an ORDER --- 768,775 ---- the MaxBackendId constant in include/storage/sinvaladt.h.

    !

    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 *************** *** 774,783 **** -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.

    3.10) Why do I need to do a dump and restore to upgrade between major PostgreSQL releases?

    --- 777,785 ---- -S parameter allows, then temporary files are created to hold the extra data.

    !

    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?

    *************** *** 790,799 **** data in a generic format that can then be loaded in using the new internal format.

    !

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


    --- 792,801 ---- data in a generic format that can then be loaded in using the new internal format.

    !

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


    *************** *** 831,838 ****

    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:

          BEGIN;
          LOCK TABLE old_table;
    --- 833,841 ----
          

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

    !

    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;
    ***************
    *** 1023,1035 ****
      
          SELECT *
          FROM tab
    !     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));
      

    4.13) In a query, how do I detect if a field --- 1026,1038 ----
          SELECT *
          FROM tab
    !     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));
      

    4.13) In a query, how do I detect if a field *************** *** 1118,1124 **** and your SERIAL column, respectively.

    Alternatively, you could retrieve the assigned ! SERIAL value with the currval() function after it was inserted by default, e.g.,

          execute("INSERT INTO person (name) VALUES ('Blaise Pascal')");
    --- 1121,1127 ----
          and your SERIAL column, respectively.
      
          

    Alternatively, you could retrieve the assigned ! SERIAL value with the currval() function after it was inserted by default, e.g.,

          execute("INSERT INTO person (name) VALUES ('Blaise Pascal')");
    ***************
    *** 1135,1141 ****
          

    4.15.3) Don't currval() and nextval() lead to a race condition with other users?

    !

    No. currval() returns the current value assigned by your backend, not by all users.

    4.15.4) Why aren't my sequence numbers --- 1138,1144 ----

    4.15.3) Don't currval() and nextval() lead to a race condition with other users?

    !

    No. currval() returns the current value assigned by your backend, not by all users.

    4.15.4) Why aren't my sequence numbers --ELM1034565302-16133-0_--