Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 09AC04753A1 for ; Sat, 12 Oct 2002 23:42:58 -0400 (EDT) Received: from post.webmailer.de (natwar.webmailer.de [192.67.198.70]) by postgresql.org (Postfix) with ESMTP id BDEC74758BD for ; Sat, 12 Oct 2002 23:42:56 -0400 (EDT) Received: from ianb.local (pD9E0E25C.dip.t-dialin.net [217.224.226.92]) by post.webmailer.de (8.9.3/8.8.7) with ESMTP id FAA21868 for ; Sun, 13 Oct 2002 05:42:59 +0200 (MEST) From: Ian Barwick To: pgsql-docs@postgresql.org Subject: Minor FAQ correction suggestions Date: Sun, 13 Oct 2002 05:44:34 +0200 X-Mailer: KMail [version 1.4] MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="------------Boundary-00=_AEIWN3BA47MY5I4DQRVU" Message-Id: <200210130544.34553.barwick@gmx.net> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/7 X-Sequence-Number: 1501 --------------Boundary-00=_AEIWN3BA47MY5I4DQRVU Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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=20 follow ASAP). General alterations: Some links corrected; links to the domain "postgresql.org" now uniformly=20 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 :-)=20 4.15.2) How do I get the value of a SERIAL insert? -> Perl is a very versatile language, but this: new_id =3D 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=20 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/glos= sary.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 --------------Boundary-00=_AEIWN3BA47MY5I4DQRVU Content-Type: text/x-diff; charset="us-ascii"; name="FAQ.html.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="FAQ.html.diff" Index: doc/src/FAQ/FAQ.html =================================================================== RCS file: /projects/cvsroot/pgsql-server/doc/src/FAQ/FAQ.html,v retrieving revision 1.158 diff -r1.158 FAQ.html 25c25 < "http://www.Postgresql.org/docs/faq-english.html">http://www.PostgreSQL.org/docs/faq-english.html.

--- > "http://www.PostgreSQL.org/docs/faq-english.html">http://www.PostgreSQL.org/docs/faq-english.html.

32,33c32 < 1.1) What is PostgreSQL? How is it < pronounced?
--- > 1.1) What is PostgreSQL? How is it pronounced?
164c163 <

1.1) What is PostgreSQL?

--- >

1.1) What is PostgreSQL? How is it pronounced?

175c174 <

PostgreSQL development is performed by a team of Internet --- >

PostgreSQL development is performed by a team of 179,180c178,179 < below on how to join). This team is now responsible for all < development of PostgreSQL.

--- > section 1.6 on how to join). This team is now > responsible for all development of PostgreSQL.

242,243c241,242 < other interfaces and binaries to run on MS Windows platforms. In < this case, the client is running on MS Windows, and communicates --- > other interfaces and client applications to run on MS Windows platforms. > In this case, the client is running on MS Windows, and communicates 245c244 < platforms. A file win31.mak is included in the distribution --- > platforms. A file win32.mak is included in the distribution 253,256c252,256 < pgsql/doc/FAQ_MSWIN in the distribution or the MS Windows FAQ < on our web site. We have no plan to do a native port to any < Microsoft platform.

--- > 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.

321c321 < "http://www.postgresql.org/users-lounge/commercial-support.html">http://www.postgresql.org/users-lounge/commercial-support.html.

--- > "http://www.PostgreSQL.org/users-lounge/commercial-support.html">http://www.PostgreSQL.org/users-lounge/commercial-support.html.

342c342 < "http://www.postgresql.org/books/">http://www.postgresql.org/books/. --- > "http://www.ca.PostgreSQL.org/books/">http://www.ca.PostgreSQL.org/books/. 345c345 < "http://techdocs.postgresql.org/">http://techdocs.postgresql.org/.

--- > "http://techdocs.PostgreSQL.org/">http://techdocs.PostgreSQL.org/.

405,408c405,408 <

Please visit the PostgreSQL BugTool < page, which gives guidelines and directions on how to submit a < bug.

--- >

Please visit the PostgreSQL BugTool page at "http://www.PostgreSQL.org/bugs/bugs.php">http://www.PostgreSQL.org/bugs/bugs.php, > which gives guidelines and directions on how to submit a > bug report.

463,464c463,464 <
Our mailing list provides a large group of developers and < users to help resolve any problems encountered. While we can not --- >
Our mailing lists provide contact with a large group of developers > and users to help resolve any problems encountered. While we cannot 470c470 < (See support FAQ item.)
--- > (See FAQ section 1.6.)
487c487 < six years ago. This is all thanks to Marc Fournier, who has created --- > in 1994. This is all thanks to Marc Fournier, who has created 497,499c497 < this effort, please go to < https://store.pgsql.com/shopping/index.php?id=1 --- > this effort, please go to http://store.pgsql.com/shopping/ 541,543d538 <

There is also one at http://www.phone.net/home/mwm/hotlist/.

< 547c542 <

For complex cases, many use the Perl interface and CGI.pm.

--- >

For complex cases, many use the Perl interface and CGI.pm or mod_perl.

553,556c548,550 <

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.flex.ro/pgaccess

--- >

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/.

561,562c555 <

2.4) What languages are available to < communicate with PostgreSQL?

--- >

2.4) What languages are able to communicate with PostgreSQL?

575c568 <
  • Perl (perl5)
  • --- >
  • Perl (DBD::Pg)
  • 585,586c578 <
  • Embedded HTML (PHP from http://www.php.net)
  • --- >
  • PHP ('pg_' functions, Pear::DB)
  • 588,590c580,581 <

    Additional interfaces are available at < http://www.postgresql.org/interfaces.html. --- >

    Additional interfaces are available at > http://www.PostgreSQL.org/interfaces.html. 777c768 <

    3.9) What are the pg_sorttempNNN.NN --- >

    3.9) What are the pg_tempNNN.NN 796,800c787,791 < However, major releases often change the internal format of system < tables and data files. These changes are often complex, so we don't < maintain backward compatability for data files. A dump outputs data < in a generic format that can then be loaded in using the new internal < format. --- > However, major releases (e.g. from 7.2 to 7.3) often change the internal > format of system tables and data files. These changes are often complex, > so we don't maintain backward compatability for data files. A dump outputs > data in a generic format that can then be loaded in using the new internal > format.

    802c793 <

    In releases where the on-disk format does not change, the --- >

    In releases where the on-disk format does not change, the 805c796 < release. --- > release.

    824c815 < the first few rows. Consider a query that has an ORDER --- > the first few rows. Consider using a query that has an ORDER 843,844c834,835 <

    We do not support ALTER TABLE DROP COLUMN, but do < this:

    --- >

    Prior to version 7.3, ALTER TABLE DROP COLUMN is not supported. > You can do this instead:

    895c886 < 24 bytes: one int field and one text filed --- > 24 bytes: one int field and one text field 960c951 < LIMIT 1 --- > LIMIT 1; 975,978c966,969 <
  • Case-insensitive searches like ILIKE and < ~* can not be used. Instead, use functional < indexes, which are described later in this FAQ.
  • <
  • The default C local must be used during --- >
  • Case-insensitive searches such as ILIKE and > ~* do not utilise indexes. Instead, use functional > indexes, which are described in section 4.12.
  • >
  • The default C locale must be used during 1035c1026 < WHERE lower(col) = 'abc' --- > WHERE LOWER(col) = 'abc'; 1041c1032 < CREATE INDEX tabindex on tab (lower(col)); --- > CREATE INDEX tabindex ON tab (LOWER(col)); 1056,1057c1047,1048 < CHAR(#) bpchar blank padded to the specified fixed length < VARCHAR(#) varchar size specifies maximum length, no padding --- > CHAR(n) bpchar blank padded to the specified fixed length > VARCHAR(n) varchar size specifies maximum length, no padding 1072,1073c1063,1064 <

    CHAR() is best when storing strings that are < usually the same length. VARCHAR() is best when --- >

    CHAR(n) is best when storing strings that are > usually the same length. VARCHAR(n) is best when 1114,1115c1105,1106 < example table in 4.15.1, that might look like < this in Perl:

    --- > example table in 4.15.1, an example in a > pseudo-language would look like this:

    1117,1118c1108,1109 < new_id = output of "SELECT nextval('person_id_seq')" < INSERT INTO person (id, name) VALUES (new_id, 'Blaise Pascal'); --- > new_id = execute("SELECT nextval('person_id_seq')"); > execute("INSERT INTO person (id, name) VALUES (new_id, 'Blaise Pascal')"); 1127c1118 < and your SERIAL column, respectively. --- > and your SERIAL column, respectively. 1133,1134c1124,1125 < INSERT INTO person (name) VALUES ('Blaise Pascal'); < new_id = output of "SELECT currval('person_id_seq')"; --- > execute("INSERT INTO person (name) VALUES ('Blaise Pascal')"); > new_id = execute("SELECT currval('person_id_seq')"); 1142c1133 < $sth->execute(). --- > $sth->execute(). 1147c1138 <

    No. Currval() returns the current value assigned by your --- >

    No. currval() returns the current value assigned by your 1166c1157 < backend/access/transam.h). All user-created --- > include/access/transam.h). All user-created 1188a1180 > 1193,1194d1184 < < 1231c1221 < "http://www.comptechnews.com/~reaster/dbdesign.html">http://www.comptechnews.com/~reaster/dbdesign.html

    --- > "http://hea-www.harvard.edu/MST/simul/software/docs/pkgs/pgsql/glossary/glossary.html">http://hea-www.harvard.edu/MST/simul/software/docs/pkgs/pgsql/glossary/glossary.html

    1250c1240 < client. --- > client. 1255c1245 <

    From psql, type select version();

    --- >

    From psql, type SELECT version();

    1291,1292c1281 <
    < SELECT *
    ---
    > 
        SELECT *
    1294,1295c1283
    <     WHERE col IN (SELECT subcol FROM subtab)
    < 
    ---
    >     WHERE col IN (SELECT subcol FROM subtab);
    1297,1299c1285,1286
    <     to: 
    < 
    < SELECT *
    ---
    >     to:
    > 
        SELECT *
    1301,1302c1288
    <     WHERE EXISTS (SELECT subcol FROM subtab WHERE subcol = col)
    < 
    ---
    >     WHERE EXISTS (SELECT subcol FROM subtab WHERE subcol = col);
    1306c1292
    <     We hope to fix this limitation in a future release. 
    ---
    >     We hope to fix this limitation in a future release.
    1365,1366c1351,1352
    <     "http://developer.postgresql.org/docs/postgres/plpgsql-cursors.html">
    <     http://developer.postgresql.org/docs/postgres/plpgsql-cursors.html,
    ---
    >     "http://www.PostgreSQL.org/idocs/index.php?plpgsql-cursors.html">
    >     http://www.PostgreSQL.org/idocs/index.php?plpgsql-cursors.html,
    1384,1385c1370,1371
    <     href="http://gborg.postgresql.org/genpage?replication_research">
    <     http://gborg.postgresql.org/genpage?replication_research lists
    ---
    >     href="http://gborg.PostgreSQL.org/genpage?replication_research">
    >     http://gborg.PostgreSQL.org/genpage?replication_research lists
    1387,1388c1373
    <     href="http://gborg.postgresql.org/project/pgreplication/projdisplay.
    <     php">http://gborg.postgresql.org/project/pgreplication/projdisplay.php.

    --- > href="http://gborg.PostgreSQL.org/project/pgreplication/projdisplay.php">http://gborg.PostgreSQL.org/project/pgreplication/projdisplay.php.

    1390c1375 <

    4.27) What encryption options are available? --- >

    4.28) What encryption options are available? 1398,1399c1383,1384 < in version 7.3. In previous versions, you must enable < password_encryption in postgresql.conf.

  • --- > in version 7.3. In previous versions, you must enable the option > PASSWORD_ENCRYPTION in postgresql.conf. --------------Boundary-00=_AEIWN3BA47MY5I4DQRVU--