From 2a69a0e14797d3ffccdf7ffc83fe07702209e414 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Tue, 22 Nov 2005 15:17:06 +0000 Subject: Update item tags. --- doc/src/FAQ/FAQ.html | 196 +++++++++++++++++++++++++-------------------------- 1 file changed, 98 insertions(+), 98 deletions(-) (limited to 'doc/src/FAQ/FAQ.html') diff --git a/doc/src/FAQ/FAQ.html b/doc/src/FAQ/FAQ.html index 18cde4782f..dc98fb783d 100644 --- a/doc/src/FAQ/FAQ.html +++ b/doc/src/FAQ/FAQ.html @@ -10,7 +10,7 @@ alink="#0000ff">

Frequently Asked Questions (FAQ) for PostgreSQL

-

Last updated: Tue Nov 22 10:12:24 EST 2005

+

Last updated: Tue Nov 22 10:16:48 EST 2005

Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us) @@ -26,97 +26,97 @@


General Questions

- 1.1) What is PostgreSQL? How is it pronounced?
- 1.2) Who controls PostgreSQL?
- 1.3) What is the copyright of PostgreSQL?
- 1.4) What platforms does PostgreSQL support?
- 1.5) Where can I get PostgreSQL?
- 1.6) What is the latest release?
- 1.7) Where can I get support?
- 1.8) How do I submit a bug report?
- 1.9) How do I find out about known bugs or + 1.1) What is PostgreSQL? How is it pronounced?
+ 1.2) Who controls PostgreSQL?
+ 1.3) What is the copyright of PostgreSQL?
+ 1.4) What platforms does PostgreSQL support?
+ 1.5) Where can I get PostgreSQL?
+ 1.6) What is the latest release?
+ 1.7) Where can I get support?
+ 1.8) How do I submit a bug report?
+ 1.9) How do I find out about known bugs or missing features?
- 1.10) What documentation is available?
- 1.11) How can I learn SQL?
- 1.12) How do I join the development team?
- 1.13) How does PostgreSQL compare to other + 1.10) What documentation is available?
+ 1.11) How can I learn SQL?
+ 1.12) How do I join the development team?
+ 1.13) How does PostgreSQL compare to other DBMSs?

User Client Questions

- 2.1) What interfaces are available for + 2.1) What interfaces are available for PostgreSQL?
- 2.2) What tools are available for using + 2.2) What tools are available for using PostgreSQL with Web pages?
- 2.3) Does PostgreSQL have a graphical user + 2.3) Does PostgreSQL have a graphical user interface?

Administrative Questions

- 3.1) How do I install PostgreSQL somewhere other + 3.1) How do I install PostgreSQL somewhere other than /usr/local/pgsql?
- 3.2) How do I control connections from other + 3.2) How do I control connections from other hosts?
- 3.3) How do I tune the database engine for + 3.3) How do I tune the database engine for better performance?
- 3.4) What debugging features are available?
- 3.5) Why do I get "Sorry, too many + 3.4) What debugging features are available?
+ 3.5) Why do I get "Sorry, too many clients" when trying to connect?
- 3.6) Why do I need to do a dump and restore + 3.6) Why do I need to do a dump and restore to upgrade PostgreSQL releases?
- 3.7) What computer hardware should I use?
+ 3.7) What computer hardware should I use?

Operational Questions

- 4.1) How do I SELECT only the + 4.1) How do I SELECT only the first few rows of a query? A random row?
- 4.2) How do I find out what tables, indexes, + 4.2) How do I find out what tables, indexes, databases, and users are defined? How do I see the queries used by psql to display them?
- 4.3) How do you change a column's data type?
- 4.4) What is the maximum size for a row, a + 4.3) How do you change a column's data type?
+ 4.4) What is the maximum size for a row, a table, and a database?
- 4.5) How much database disk space is required + 4.5) How much database disk space is required to store data from a typical text file?
- 4.6) Why are my queries slow? Why don't they + 4.6) Why are my queries slow? Why don't they use my indexes?
- 4.7) How do I see how the query optimizer is + 4.7) How do I see how the query optimizer is evaluating my query?
- 4.8) How do I perform regular expression + 4.8) How do I perform regular expression searches and case-insensitive regular expression searches? How do I use an index for case-insensitive searches?
- 4.9) In a query, how do I detect if a field + 4.9) In a query, how do I detect if a field is NULL? How can I sort on whether a field is NULL or not?
- 4.10) What is the difference between the + 4.10) What is the difference between the various character types?
- 4.11.1) How do I create a + 4.11.1) How do I create a serial/auto-incrementing field?
- 4.11.2) How do I get the value of a + 4.11.2) How do I get the value of a SERIAL insert?
- 4.11.3) Doesn't currval() + 4.11.3) Doesn't currval() lead to a race condition with other users?
- 4.11.4) Why aren't my sequence numbers + 4.11.4) Why aren't my sequence numbers reused on transaction abort? Why are there gaps in the numbering of my sequence/SERIAL column?
- 4.12) What is an OID? What is a + 4.12) What is an OID? What is a CTID?
- 4.13) Why do I get the error "ERROR: Memory + 4.13) Why do I get the error "ERROR: Memory exhausted in AllocSetAlloc()"?
- 4.14) How do I tell what PostgreSQL version I + 4.14) How do I tell what PostgreSQL version I am running?
- 4.15) How do I create a column that will + 4.15) How do I create a column that will default to the current time?
- 4.16) How do I perform an outer join?
- 4.17) How do I perform queries using multiple + 4.16) How do I perform an outer join?
+ 4.17) How do I perform queries using multiple databases?
- 4.18) How do I return multiple rows or columns + 4.18) How do I return multiple rows or columns from a function?
- 4.19) Why do I get "relation with OID ##### + 4.19) Why do I get "relation with OID ##### does not exist" errors when accessing temporary tables in PL/PgSQL functions?
- 4.20) What replication solutions are available?
- 4.21) Why are my table and column names not + 4.20) What replication solutions are available?
+ 4.21) Why are my table and column names not recognized in my query?
@@ -124,7 +124,7 @@

General Questions

-

1.1) What is PostgreSQL? How is it pronounced?

+

1.1) What is PostgreSQL? How is it pronounced?

PostgreSQL is pronounced Post-Gres-Q-L, and is also sometimes referred to as just Postgres. An audio file is available in @@ -145,7 +145,7 @@ http://www.postgresql.org/files/documentation/faqs/FAQ_DEV.html

-

1.2) Who controls PostgreSQL?

+

1.2) Who controls PostgreSQL?

If you are looking for a PostgreSQL gatekeeper, central committee, or controlling company, give up --- there isn't one. We do have a @@ -157,7 +157,7 @@ Developer's FAQ for information on how to get involved in PostgreSQL development.)

-

1.3) What is the copyright of +

1.3) What is the copyright of PostgreSQL?

PostgreSQL is distributed under the classic BSD license. Basically, @@ -191,7 +191,7 @@ UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

-

1.4) What platforms does PostgreSQL support?

+

1.4) What platforms does PostgreSQL support?

In general, any modern Unix-compatible platform should be able to run PostgreSQL. The platforms that had received explicit testing at @@ -210,21 +210,21 @@ "http://hobbes.nmsu.edu/cgi-bin/h-search?sh=1&button=Search&key=postgreSQL&stype=all&sort=type&dir=%2F"> http://hobbes.nmsu.edu/cgi-bin/h-search?sh=1&button=Search&key=postgreSQL&stype=all&sort=type&dir=%2F.

-

1.5) Where can I get PostgreSQL?

+

1.5) Where can I get PostgreSQL?

Via web browser, use http://www.postgresql.org/ftp/, and via ftp, use ftp://ftp.PostgreSQL.org/pub/.

-

1.6) What is the latest release?

+

1.6) What is the latest release?

The latest release of PostgreSQL is version 8.1.1

We plan to have a major release every year, with minor releases every few months.

-

1.7) Where can I get support?

+

1.7) Where can I get support?

The PostgreSQL community provides assistance to many of its users via email. The main web site to subscribe to the email lists is @@ -243,7 +243,7 @@ "http://techdocs.postgresql.org/companies.php"> http://techdocs.postgresql.org/companies.php.

-

1.8) How do I submit a bug report?

+

1.8) How do I submit a bug report?

Visit the PostgreSQL bug form at @@ -280,7 +280,7 @@ -

1.9) How do I find out about known bugs or +

1.9) How do I find out about known bugs or missing features?

PostgreSQL supports an extended subset of SQL:2003. @@ -312,7 +312,7 @@ Even the release notes do not contain every change made to the software.

-

1.10) What documentation is available?

+

1.10) What documentation is available?

PostgreSQL includes extensive documentation, including a large manual, manual pages, and some test examples. See the /doc @@ -338,7 +338,7 @@

Our web site contains even more documentation.

-

1.11) How can I learn +

1.11) How can I learn SQL?

First, consider the PostgreSQL-specific books mentioned above. @@ -357,13 +357,13 @@ and at http://sqlcourse.com.

-

1.12) How do I join the development +

1.12) How do I join the development team?

See the Developer's FAQ.

-

1.13) How does PostgreSQL compare to other +

1.13) How does PostgreSQL compare to other DBMSs?

There are several ways of measuring software: features, @@ -410,7 +410,7 @@ community, manuals, and the source code often make PostgreSQL support superior to other DBMSs. There is commercial per-incident support available for those who need it. - (See FAQ section 1.7.)
+ (See FAQ section 1.7.)

@@ -427,7 +427,7 @@

User Client Questions

-

2.1) What interfaces are available for +

2.1) What interfaces are available for PostgreSQL?

The PostgreSQL install includes only the C and embedded @@ -442,7 +442,7 @@ in the Drivers/Interfaces section and via Internet search.

-

2.2) What tools are available for using +

2.2) What tools are available for using PostgreSQL with Web pages?

A nice introduction to Database-backed Web pages can be seen at: @@ -455,7 +455,7 @@

For complex cases, many use the Perl and DBD::Pg with CGI.pm or mod_perl.

-

2.3) Does PostgreSQL have a graphical user +

2.3) Does PostgreSQL have a graphical user interface?

Yes, see @@ -467,13 +467,13 @@

Administrative Questions

-

3.1) How do I install PostgreSQL somewhere +

3.1) How do I install PostgreSQL somewhere other than /usr/local/pgsql?

Specify the --prefix option when running configure.

-

3.2) How do I control connections from other +

3.2) How do I control connections from other hosts?

By default, PostgreSQL only allows connections from the local @@ -483,7 +483,7 @@ host-based authentication by modifying the $PGDATA/pg_hba.conf file, and restart the server.

-

3.3) How do I tune the database engine for +

3.3) How do I tune the database engine for better performance?

There are three major areas for potential performance @@ -540,14 +540,14 @@ -

3.4) What debugging features are +

3.4) What debugging features are available?

There are many log_* server configuration variables that enable printing of query and process statistics which can be very useful for debugging and performance measurements.

-

3.5) Why do I get "Sorry, too many +

3.5) Why do I get "Sorry, too many clients" when trying to connect?

You have reached the default limit is 100 database sessions. You @@ -556,7 +556,7 @@ max_connections value in postgresql.conf and restarting the postmaster.

-

3.6) Why do I need to do a dump and restore +

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

The PostgreSQL team makes only small changes between minor releases, @@ -567,7 +567,7 @@ data in a generic format that can then be loaded in using the new internal format.

-

3.7) What computer hardware should I use?

+

3.7) What computer hardware should I use?

Because PC hardware is mostly compatible, people tend to believe that all PC hardware is of equal quality. It is not. ECC RAM, SCSI, and @@ -581,7 +581,7 @@

Operational Questions

-

4.1) How do I SELECT only the +

4.1) How do I SELECT only the first few rows of a query? A random row?

To retrieve only a few rows, if you know at the number of rows @@ -600,7 +600,7 @@ LIMIT 1; -

4.2) How do I find out what tables, indexes, +

4.2) How do I find out what tables, indexes, databases, and users are defined? How do I see the queries used by psql to display them?

@@ -623,7 +623,7 @@ illustrates many of the SELECTs needed to get information from the database system tables.

-

4.3) How do you change a column's data type?

+

4.3) How do you change a column's data type?

Changing the data type of a column can be done easily in 8.0 and later with ALTER TABLE ALTER COLUMN TYPE.

@@ -639,7 +639,7 @@

You might then want to do VACUUM FULL tab to reclaim the disk space used by the expired rows.

-

4.4) What is the maximum size for a row, a +

4.4) What is the maximum size for a row, a table, and a database?

These are the limits:

@@ -676,7 +676,7 @@ table?unlimited of an MD5 hash of the long column, and full text indexing allows for searching of words within the column.

-

4.5) How much database disk space is required +

4.5) How much database disk space is required to store data from a typical text file?

A PostgreSQL database may require up to five times the disk @@ -713,7 +713,7 @@ table?unlimited

NULLs are stored as bitmaps, so they use very little space.

-

4.6) Why are my queries slow? Why don't they +

4.6) Why are my queries slow? Why don't they use my indexes?

Indexes are not used by every query. Indexes are used only if the @@ -764,7 +764,7 @@ table?unlimited e.g. [a-e].

  • Case-insensitive searches such as ILIKE and ~* do not utilize indexes. Instead, use expression - indexes, which are described in section 4.8.
  • + indexes, which are described in section 4.8.
  • The default C locale must be used during initdb because it is not possible to know the next-greatest character in a non-C locale. You can create a special @@ -777,12 +777,12 @@ table?unlimited types exactly match the index's column types. This was particularly true of int2, int8, and numeric column indexes.

    -

    4.7) How do I see how the query optimizer is +

    4.7) How do I see how the query optimizer is evaluating my query?

    See the EXPLAIN manual page.

    -

    4.8) How do I perform regular expression +

    4.8) How do I perform regular expression searches and case-insensitive regular expression searches? How do I use an index for case-insensitive searches?

    @@ -809,7 +809,7 @@ table?unlimited case to be stored in the column, use a CHECK constraint or a trigger.

    -

    4.9) In a query, how do I detect if a field +

    4.9) In a query, how do I detect if a field is NULL? How can I sort on whether a field is NULL or not?

    @@ -833,7 +833,7 @@ table?unlimited ORDER BY (col IS NOT NULL) -

    4.10) What is the difference between the +

    4.10) What is the difference between the various character types?

    @@ -869,7 +869,7 @@ length particularly values that include NULL bytes. All the types described here have similar performance characteristics.

    -

    4.11.1) How do I create a +

    4.11.1) How do I create a serial/auto-incrementing field?

    PostgreSQL supports a SERIAL data type. It @@ -894,13 +894,13 @@ length See the create_sequence manual page for more information about sequences. -

    4.11.2) How do I get the value of a +

    4.11.2) How do I get the value of a SERIAL insert?

    One approach is to retrieve the next SERIAL value from the sequence object with the nextval() function before inserting and then insert it explicitly. Using the - example table in 4.11.1, an example in a + example table in 4.11.1, an example in a pseudo-language would look like this:

         new_id = execute("SELECT nextval('person_id_seq')");
    @@ -923,13 +923,13 @@ length
         new_id = execute("SELECT currval('person_id_seq')");
     
    -

    4.11.3) Doesn't currval() +

    4.11.3) Doesn't currval() lead to a race condition with other users?

    No. currval() returns the current value assigned by your session, not by all sessions.

    -

    4.11.4) Why aren't my sequence numbers +

    4.11.4) Why aren't my sequence numbers reused on transaction abort? Why are there gaps in the numbering of my sequence/SERIAL column?

    @@ -938,7 +938,7 @@ length completes. This causes gaps in numbering from aborted transactions.

    -

    4.12) What is an OID? What is +

    4.12) What is an OID? What is a CTID?

    Every row that is created in PostgreSQL gets a unique @@ -961,7 +961,7 @@ length are modified or reloaded. They are used by index entries to point to physical rows.

    -

    4.13) Why do I get the error "ERROR: +

    4.13) Why do I get the error "ERROR: Memory exhausted in AllocSetAlloc()"?

    You probably have run out of virtual memory on your system, @@ -980,12 +980,12 @@ length backend is returning too much data, try it before starting the client. -

    4.14) How do I tell what PostgreSQL version +

    4.14) How do I tell what PostgreSQL version I am running?

    From psql, type SELECT version();

    -

    4.15) How do I create a column that will +

    4.15) How do I create a column that will default to the current time?

    Use CURRENT_TIMESTAMP:

    @@ -993,7 +993,7 @@ length CREATE TABLE test (x int, modtime TIMESTAMP DEFAULT CURRENT_TIMESTAMP ); -

    4.16) How do I perform an outer join?

    +

    4.16) How do I perform an outer join?

    PostgreSQL supports outer joins using the SQL standard syntax. Here are two examples:

    @@ -1016,7 +1016,7 @@ length RIGHT, and FULL joins. Ordinary joins are called INNER joins.

    -

    4.17) How do I perform queries using +

    4.17) How do I perform queries using multiple databases?

    There is no way to query a database other than the current one. @@ -1028,14 +1028,14 @@ length connections to different databases and merge the results on the client side.

    -

    4.18) How do I return multiple rows or +

    4.18) How do I return multiple rows or columns from a function?

    It is easy using set-returning functions, http://techdocs.postgresql.org/guides/SetReturningFunctions

    . -

    4.19) Why do I get "relation with OID ##### +

    4.19) Why do I get "relation with OID ##### does not exist" errors when accessing temporary tables in PL/PgSQL functions?

    @@ -1047,7 +1047,7 @@ length EXECUTE for temporary table access in PL/PgSQL. This will cause the query to be reparsed every time.

    -

    4.20) What replication solutions are available? +

    4.20) What replication solutions are available?

    Though "replication" is a single term, there are several technologies @@ -1069,7 +1069,7 @@ length

    There are also commercial and hardware-based replication solutions available supporting a variety of replication models.

    -

    4.21) Why are my table and column names not +

    4.21) Why are my table and column names not recognized in my query?

    The most common cause is the use of double-quotes around table or -- cgit v1.2.1