1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-05 23:56:58 +03:00

Update 8.1.X FAQs.

This commit is contained in:
Bruce Momjian 2005-12-08 21:37:54 +00:00
parent e2d7e03fb2
commit 5e6e9526c9
5 changed files with 336 additions and 240 deletions

137
doc/FAQ
View File

@ -1,7 +1,7 @@
Frequently Asked Questions (FAQ) for PostgreSQL
Last updated: Fri Nov 4 20:35:04 EST 2005
Last updated: Tue Nov 22 11:26:48 EST 2005
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
@ -15,18 +15,18 @@
General Questions
1.1) What is PostgreSQL? How is it pronounced?
1.2) What is the copyright of PostgreSQL?
1.3) What platforms does PostgreSQL support?
1.4) Where can I get PostgreSQL?
1.5) Where can I get support?
1.6) How do I submit a bug report?
1.7) What is the latest release?
1.8) What documentation is available?
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) How can I learn SQL?
1.11) How do I join the development team?
1.12) How does PostgreSQL compare to other DBMSs?
1.13) Who controls PostgreSQL?
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
@ -101,13 +101,25 @@
company. To get involved, see the developer's FAQ at
http://www.postgresql.org/files/documentation/faqs/FAQ_DEV.html
1.2) What is the copyright of PostgreSQL?
1.2) Who controls PostgreSQL?
PostgreSQL is distributed under the classic BSD license. It has no
restrictions on how the source code can be used. We like it and have
no intention of changing it.
If you are looking for a PostgreSQL gatekeeper, central committee, or
controlling company, give up --- there isn't one. We do have a core
committee and CVS committers, but these groups are more for
administrative purposes than control. The project is directed by the
community of developers and users, which anyone can join. All you need
to do is subscribe to the mailing lists and participate in the
discussions. (See the Developer's FAQ for information on how to get
involved in PostgreSQL development.)
This is the BSD license we use:
1.3) What is the copyright of PostgreSQL?
PostgreSQL is distributed under the classic BSD license. Basically, it
allows users to do anything they want with the code, including
reselling binaries without the source code. The only restriction is
that you not hold us legally liable for problems with the software.
There is also the requirement that this copyright appear in all copies
of the software. Here is the actual BSD license we use:
PostgreSQL Data Base Management System
@ -134,7 +146,7 @@
CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1.3) 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 the
@ -151,12 +163,19 @@
http://hobbes.nmsu.edu/cgi-bin/h-search?sh=1&button=Search&key=postgre
SQL&stype=all&sort=type&dir=%2F.
1.4) 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.5) Where can I get support?
1.6) What is the latest release?
The latest release of PostgreSQL is version 8.1.
We plan to have a major release every year, with minor releases every
few months.
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
@ -172,22 +191,56 @@
A list of commercial support companies is available at
http://techdocs.postgresql.org/companies.php.
1.6) How do I submit a bug report?
1.8) How do I submit a bug report?
Visit the PostgreSQL bug form at
http://www.postgresql.org/support/submitbug.
http://www.postgresql.org/support/submitbug. Also check out our ftp
site ftp://ftp.PostgreSQL.org/pub/ to see if there is a more recent
PostgreSQL version.
Also check out our ftp site ftp://ftp.PostgreSQL.org/pub/ to see if
there is a more recent PostgreSQL version.
1.7) What is the latest release?
Bugs submitted using the bug form or posted to any PostgreSQL mailing
list typically generates one of the following replies:
* It is not a bug, and why
* It is a known bug and is already on the TODO list
* The bug has been fixed in the current release
* The bug has been fixed but is not packaged yet in an official
release
* A request is made for more detailed information:
+ Operating system
+ PostgreSQL version
+ Reproducible test case
+ Debugging information
+ Debugger backtrace output
* The bug is new. The following might happen:
+ A patch is created and will be included in the next major or
minor release
+ The bug cannot be fixed immediately and is added to the TODO
list
1.9) How do I find out about known bugs or missing features?
The latest release of PostgreSQL is version 8.1.
PostgreSQL supports an extended subset of SQL:2003. See our TODO list
for known bugs, missing features, and future plans.
We plan to have a major release every year, with minor releases every
few months.
A feature request usually results in one of the following replies:
* The feature is already on the TODO list
* The feature is not desired because:
+ It duplicates existing functionality that already follows the
SQL standard
+ The feature would increase code complexity but add little
benefit
+ The feature would be insecure or unreliable
* The new feature is added to the TODO list
PostgreSQL does not use a bug tracking system because we find it more
efficient to respond directly to email and keep the TODO list
up-to-date. In practice, bugs don't last very long in the software,
and bugs that affect a large number of users are fixed rapidly. The
only place to find all changes, improvements, and fixes in a
PostgreSQL release is to read the CVS log messages. Even the release
notes do not list every change made to the software.
1.8) 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 directory. You can
@ -208,12 +261,7 @@
Our web site contains even more documentation.
1.9) How do I find out about known bugs or missing features?
PostgreSQL supports an extended subset of SQL:2003. See our TODO list
for known bugs, missing features, and future plans.
1.10) How can I learn SQL?
1.11) How can I learn SQL?
First, consider the PostgreSQL-specific books mentioned above. Another
one is "Teach Yourself SQL in 21 Days, Second Edition" at
@ -227,11 +275,11 @@
http://ourworld.compuserve.com/homepages/graeme_birchall/HTM_COOK.HTM,
and at http://sqlcourse.com.
1.11) How do I join the development team?
1.12) How do I join the development team?
See the Developer's FAQ.
1.12) How does PostgreSQL compare to other DBMSs?
1.13) How does PostgreSQL compare to other DBMSs?
There are several ways of measuring software: features, performance,
reliability, support, and price.
@ -266,23 +314,12 @@
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.5.)
section 1.7.)
Price
We are free for all use, both commercial and non-commercial.
You can add our code to your product with no limitations,
except those outlined in our BSD-style license stated above.
1.13) 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 core
committee and CVS committers, but these groups are more for
administrative purposes than control. The project is directed by the
community of developers and users, which anyone can join. All you need
to do is subscribe to the mailing lists and participate in the
discussions. (See the Developer's FAQ for information on how to get
involved in PostgreSQL development.)
_________________________________________________________________
User Client Questions

View File

@ -1,5 +1,5 @@
From: Zeugswetter Andreas <ZeugswetterA@spardat.at>
$Date: 2005/12/08 21:36:55 $
$Date: 2005/12/08 21:37:53 $
On AIX 4.3.2 PostgreSQL compiled with the native IBM compiler xlc
(vac.C 5.0.1) passes all regression tests. Other versions of OS and

View File

@ -1,7 +1,7 @@
Developer's Frequently Asked Questions (FAQ) for PostgreSQL
Last updated: Thu Oct 27 09:48:14 EDT 2005
Last updated: Tue Nov 22 10:17:51 EST 2005
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)

View File

@ -10,7 +10,7 @@
alink="#0000ff">
<H1>Frequently Asked Questions (FAQ) for PostgreSQL</H1>
<P>Last updated: Fri Nov 4 20:35:04 EST 2005</P>
<P>Last updated: Tue Nov 22 11:26:48 EST 2005</P>
<P>Current maintainer: Bruce Momjian (<A href=
"mailto:pgman@candle.pha.pa.us">pgman@candle.pha.pa.us</A>)
@ -26,97 +26,97 @@
<HR>
<H2 align="center">General Questions</H2>
<A href="#1.1">1.1</A>) What is PostgreSQL? How is it pronounced?<BR>
<A href="#1.2">1.2</A>) What is the copyright of PostgreSQL?<BR>
<A href="#1.3">1.3</A>) What platforms does PostgreSQL support?<BR>
<A href="#1.4">1.4</A>) Where can I get PostgreSQL?<BR>
<A href="#1.5">1.5</A>) Where can I get support?<BR>
<A href="#1.6">1.6</A>) How do I submit a bug report?<BR>
<A href="#1.7">1.7</A>) What is the latest release?<BR>
<A href="#1.8">1.8</A>) What documentation is available?<BR>
<A href="#1.9">1.9</A>) How do I find out about known bugs or
missing features?<BR>
<A href="#1.10">1.10</A>) How can I learn <SMALL>SQL</SMALL>?<BR>
<A href="#1.11">1.11</A>) How do I join the development team?<BR>
<A href="#1.12">1.12</A>) How does PostgreSQL compare to other
<A href="#item1.1">1.1</A>) What is PostgreSQL? How is it pronounced?<BR>
<A href="#item1.2">1.2</A>) Who controls PostgreSQL?<BR>
<A href="#item1.3">1.3</A>) What is the copyright of PostgreSQL?<BR>
<A href="#item1.4">1.4</A>) What platforms does PostgreSQL support?<BR>
<A href="#item1.5">1.5</A>) Where can I get PostgreSQL?<BR>
<A href="#item1.6">1.6</A>) What is the latest release?<BR>
<A href="#item1.7">1.7</A>) Where can I get support?<BR>
<A href="#item1.8">1.8</A>) How do I submit a bug report?<BR>
<A href="#item1.9">1.9</A>) How do I find out about known bugs or
missing features?<BR>
<A href="#item1.10">1.10</A>) What documentation is available?<BR>
<A href="#item1.11">1.11</A>) How can I learn <SMALL>SQL</SMALL>?<BR>
<A href="#item1.12">1.12</A>) How do I join the development team?<BR>
<A href="#item1.13">1.13</A>) How does PostgreSQL compare to other
<SMALL>DBMS</SMALL>s?<BR>
<A href="#1.13">1.13</A>) Who controls PostgreSQL?<BR>
<H2 align="center">User Client Questions</H2>
<A href="#2.1">2.1</A>) What interfaces are available for
<A href="#item2.1">2.1</A>) What interfaces are available for
PostgreSQL?<BR>
<A href="#2.2">2.2</A>) What tools are available for using
<A href="#item2.2">2.2</A>) What tools are available for using
PostgreSQL with Web pages?<BR>
<A href="#2.3">2.3</A>) Does PostgreSQL have a graphical user
<A href="#item2.3">2.3</A>) Does PostgreSQL have a graphical user
interface?<BR>
<H2 align="center">Administrative Questions</H2>
<A href="#3.1">3.1</A>) How do I install PostgreSQL somewhere other
<A href="#item3.1">3.1</A>) How do I install PostgreSQL somewhere other
than <I>/usr/local/pgsql</I>?<BR>
<A href="#3.2">3.2</A>) How do I control connections from other
<A href="#item3.2">3.2</A>) How do I control connections from other
hosts?<BR>
<A href="#3.3">3.3</A>) How do I tune the database engine for
<A href="#item3.3">3.3</A>) How do I tune the database engine for
better performance?<BR>
<A href="#3.4">3.4</A>) What debugging features are available?<BR>
<A href="#3.5">3.5</A>) Why do I get <I>"Sorry, too many
<A href="#item3.4">3.4</A>) What debugging features are available?<BR>
<A href="#item3.5">3.5</A>) Why do I get <I>"Sorry, too many
clients"</I> when trying to connect?<BR>
<A href="#3.6">3.6</A>) Why do I need to do a dump and restore
<A href="#item3.6">3.6</A>) Why do I need to do a dump and restore
to upgrade PostgreSQL releases?<BR>
<A href="#3.7">3.7</A>) What computer hardware should I use?<BR>
<A href="#item3.7">3.7</A>) What computer hardware should I use?<BR>
<H2 align="center">Operational Questions</H2>
<A href="#4.1">4.1</A>) How do I <SMALL>SELECT</SMALL> only the
<A href="#item4.1">4.1</A>) How do I <SMALL>SELECT</SMALL> only the
first few rows of a query? A random row?<BR>
<A href="#4.2">4.2</A>) How do I find out what tables, indexes,
<A href="#item4.2">4.2</A>) How do I find out what tables, indexes,
databases, and users are defined? How do I see the queries used
by <I>psql</I> to display them?<BR>
<A href="#4.3">4.3</A>) How do you change a column's data type?<BR>
<A href="#4.4">4.4</A>) What is the maximum size for a row, a
<A href="#item4.3">4.3</A>) How do you change a column's data type?<BR>
<A href="#item4.4">4.4</A>) What is the maximum size for a row, a
table, and a database?<BR>
<A href="#4.5">4.5</A>) How much database disk space is required
<A href="#item4.5">4.5</A>) How much database disk space is required
to store data from a typical text file?<BR>
<A href="#4.6">4.6</A>) Why are my queries slow? Why don't they
<A href="#item4.6">4.6</A>) Why are my queries slow? Why don't they
use my indexes?<BR>
<A href="#4.7">4.7</A>) How do I see how the query optimizer is
<A href="#item4.7">4.7</A>) How do I see how the query optimizer is
evaluating my query?<BR>
<A href="#4.8">4.8</A>) How do I perform regular expression
<A href="#item4.8">4.8</A>) How do I perform regular expression
searches and case-insensitive regular expression searches? How do I
use an index for case-insensitive searches?<BR>
<A href="#4.9">4.9</A>) In a query, how do I detect if a field
<A href="#item4.9">4.9</A>) In a query, how do I detect if a field
is <SMALL>NULL</SMALL>? How can I sort on whether a field is <SMALL>
NULL</SMALL> or not?<BR>
<A href="#4.10">4.10</A>) What is the difference between the
<A href="#item4.10">4.10</A>) What is the difference between the
various character types?<BR>
<A href="#4.11.1">4.11.1</A>) How do I create a
<A href="#item4.11.1">4.11.1</A>) How do I create a
serial/auto-incrementing field?<BR>
<A href="#4.11.2">4.11.2</A>) How do I get the value of a
<A href="#item4.11.2">4.11.2</A>) How do I get the value of a
<SMALL>SERIAL</SMALL> insert?<BR>
<A href="#4.11.3">4.11.3</A>) Doesn't <I>currval()</I>
<A href="#item4.11.3">4.11.3</A>) Doesn't <I>currval()</I>
lead to a race condition with other users?<BR>
<A href="#4.11.4">4.11.4</A>) Why aren't my sequence numbers
<A href="#item4.11.4">4.11.4</A>) Why aren't my sequence numbers
reused on transaction abort? Why are there gaps in the numbering of
my sequence/SERIAL column?<BR>
<A href="#4.12">4.12</A>) What is an <SMALL>OID</SMALL>? What is a
<A href="#item4.12">4.12</A>) What is an <SMALL>OID</SMALL>? What is a
<SMALL>CTID</SMALL>?<BR>
<A href="#4.13">4.13</A>) Why do I get the error <I>"ERROR: Memory
<A href="#item4.13">4.13</A>) Why do I get the error <I>"ERROR: Memory
exhausted in AllocSetAlloc()"</I>?<BR>
<A href="#4.14">4.14</A>) How do I tell what PostgreSQL version I
<A href="#item4.14">4.14</A>) How do I tell what PostgreSQL version I
am running?<BR>
<A href="#4.15">4.15</A>) How do I create a column that will
<A href="#item4.15">4.15</A>) How do I create a column that will
default to the current time?<BR>
<A href="#4.16">4.16</A>) How do I perform an outer join?<BR>
<A href="#4.17">4.17</A>) How do I perform queries using multiple
<A href="#item4.16">4.16</A>) How do I perform an outer join?<BR>
<A href="#item4.17">4.17</A>) How do I perform queries using multiple
databases?<BR>
<A href="#4.18">4.18</A>) How do I return multiple rows or columns
<A href="#item4.18">4.18</A>) How do I return multiple rows or columns
from a function?<BR>
<A href="#4.19">4.19</A>) Why do I get "relation with OID #####
<A href="#item4.19">4.19</A>) Why do I get "relation with OID #####
does not exist" errors when accessing temporary tables in PL/PgSQL
functions?<BR>
<A href="#4.20">4.20</A>) What replication solutions are available?<BR>
<A href="#4.21">4.21</A>) Why are my table and column names not
<A href="#item4.20">4.20</A>) What replication solutions are available?<BR>
<A href="#item4.21">4.21</A>) Why are my table and column names not
recognized in my query?<BR>
@ -124,7 +124,7 @@
<H2 align="center">General Questions</H2>
<H3><A name="1.1">1.1</A>) What is PostgreSQL? How is it pronounced?</H3>
<H3 id="item1.1">1.1) What is PostgreSQL? How is it pronounced?</H3>
<P>PostgreSQL is pronounced <I>Post-Gres-Q-L</I>, and is also sometimes
referred to as just <I>Postgres</I>. An audio file is available in
@ -145,14 +145,27 @@
http://www.postgresql.org/files/documentation/faqs/FAQ_DEV.html</A>
</P>
<H3><A name="1.2">1.2</A>) What is the copyright of
<H3 id="item1.2">1.2) Who controls PostgreSQL?<BR></H3>
<P>If you are looking for a PostgreSQL gatekeeper, central committee,
or controlling company, give up --- there isn't one. We do have a
core committee and CVS committers, but these groups are more for
administrative purposes than control. The project is directed by
the community of developers and users, which anyone can join. All
you need to do is subscribe to the mailing lists and participate in the
discussions. (See the <a href="http://www.postgresql.org/docs/faqs.FAQ_DEV.html">
Developer's FAQ</A> for information on how to get involved in PostgreSQL
development.)</P>
<H3 id="item1.3">1.3) What is the copyright of
PostgreSQL?</H3>
<P>PostgreSQL is distributed under the classic BSD license. It has
no restrictions on how the source code can be used. We like it and
have no intention of changing it.</P>
<P>This is the BSD license we use:</P>
<P>PostgreSQL is distributed under the classic BSD license. Basically,
it allows users to do anything they want with the code, including
reselling binaries without the source code. The only restriction is
that you not hold us legally liable for problems with the software.
There is also the requirement that this copyright appear in all copies
of the software. Here is the actual BSD license we use:</P>
<P>PostgreSQL Data Base Management System</P>
@ -178,7 +191,7 @@
UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE,
SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.</P>
<H3><A name="1.3">1.3</A>) What platforms does PostgreSQL support?</H3>
<H3 id="item1.4">1.4) What platforms does PostgreSQL support?</H3>
<P>In general, any modern Unix-compatible platform should be able to
run PostgreSQL. The platforms that had received explicit testing at
@ -197,14 +210,21 @@
"http://hobbes.nmsu.edu/cgi-bin/h-search?sh=1&amp;button=Search&amp;key=postgreSQL&amp;stype=all&amp;sort=type&amp;dir=%2F">
http://hobbes.nmsu.edu/cgi-bin/h-search?sh=1&amp;button=Search&amp;key=postgreSQL&amp;stype=all&amp;sort=type&amp;dir=%2F</a>.</p>
<H3><A name="1.4">1.4</A>) Where can I get PostgreSQL?</H3>
<H3 id="item1.5">1.5) Where can I get PostgreSQL?</H3>
<P>Via web browser, use <a href="http://www.postgresql.org/ftp/">
http://www.postgresql.org/ftp/</a>, and via ftp, use
<A href="ftp://ftp.PostgreSQL.org/pub/">
ftp://ftp.PostgreSQL.org/pub/</A>.</P>
<H3><A name="1.5">1.5</A>) Where can I get support?</H3>
<H3 id="item1.6">1.6) What is the latest release?</H3>
<P>The latest release of PostgreSQL is version 8.1.</P>
<P>We plan to have a major release every year, with minor releases
every few months.</P>
<H3 id="item1.7">1.7) Where can I get support?</H3>
<P>The PostgreSQL community provides assistance to many of its users
via email. The main web site to subscribe to the email lists is
@ -223,24 +243,82 @@
"http://techdocs.postgresql.org/companies.php">
http://techdocs.postgresql.org/companies.php</A>.</P>
<H3><A name="1.6">1.6</A>) How do I submit a bug report?</H3>
<H3 id="item1.8">1.8) How do I submit a bug report?</H3>
<P>Visit the PostgreSQL bug form at <A href=
"http://www.postgresql.org/support/submitbug">
http://www.postgresql.org/support/submitbug</A>.</P>
<P>Also check out our ftp site <A href=
http://www.postgresql.org/support/submitbug</A>.
Also check out our ftp site <A href=
"ftp://ftp.PostgreSQL.org/pub/">ftp://ftp.PostgreSQL.org/pub/</A> to
see if there is a more recent PostgreSQL version.</P>
<H3><A name="1.7">1.7</A>) What is the latest release?</H3>
<P>Bugs submitted using the bug form or posted to any PostgreSQL mailing
list typically generates one of the following replies:</P>
<ul>
<li>It is not a bug, and why</li>
<li>It is a known bug and is already on the
<A href="http://www.postgresql.org/docs/faqs.TODO.html">TODO</A> list</li>
<li>The bug has been fixed in the current release</li>
<li>The bug has been fixed but is not packaged yet in an official
release</li>
<li>A request is made for more detailed information:
<ul>
<li>Operating system</li>
<li>PostgreSQL version</li>
<li>Reproducible test case</li>
<li>Debugging information</li>
<li>Debugger backtrace output</li>
</ul>
</li>
<li>The bug is new. The following might happen:
<ul>
<li>A patch is created and will be included in the next major
or minor release</li>
<li>The bug cannot be fixed immediately and is added
to the <A href="http://www.postgresql.org/docs/faqs.TODO.html">TODO</A>
list</li>
</ul>
</li>
</ul>
<H3 id="item1.9">1.9) How do I find out about known bugs or
missing features?</H3>
<P>The latest release of PostgreSQL is version 8.1.</P>
<P>PostgreSQL supports an extended subset of <SMALL>SQL:2003</SMALL>.
See our <A href="http://www.postgresql.org/docs/faqs.TODO.html">TODO</A>
list for known bugs, missing features, and future plans.</P>
<P>We plan to have a major release every year, with minor releases
every few months.</P>
<H3><A name="1.8">1.8</A>) What documentation is available?</H3>
<P>A feature request usually results in one of the following
replies:</P>
<ul>
<li>The feature is already on the
<A href="http://www.postgresql.org/docs/faqs.TODO.html">TODO</A>
list</li>
<li>The feature is not desired because:
<ul>
<li>It duplicates existing functionality that already
follows the SQL standard</li>
<li>The feature would increase code complexity but add little
benefit</li>
<li>The feature would be insecure or unreliable</li>
</ul>
</li>
<li>The new feature is added to the
<A href="http://www.postgresql.org/docs/faqs.TODO.html">TODO</A> list</li>
</ul>
<P>PostgreSQL does not use a bug tracking system because we find
it more efficient to respond directly to email and keep the
<A href="http://www.postgresql.org/docs/faqs.TODO.html">TODO</A>
list up-to-date. In practice, bugs don't last very long in the
software, and bugs that affect a large number of users are fixed
rapidly. The only place to find all changes, improvements, and
fixes in a PostgreSQL release is to read the
<a href="http://www.postgresql.org/developer/sourcecode/">CVS</a>
log messages. Even the release notes do not list every change
made to the software.</P>
<H3 id="item1.10">1.10) What documentation is available?</H3>
<P>PostgreSQL includes extensive documentation, including a large
manual, manual pages, and some test examples. See the <I>/doc</I>
@ -266,14 +344,7 @@
<P>Our web site contains even more documentation.</P>
<H3><A name="1.9">1.9</A>) How do I find out about known bugs or
missing features?</H3>
<P>PostgreSQL supports an extended subset of <SMALL>SQL:2003</SMALL>.
See our <A href="http://www.postgresql.org/docs/faqs.TODO.html">TODO</A>
list for known bugs, missing features, and future plans.</P>
<H3><A name="1.10">1.10</A>) How can I learn
<H3 id="item1.11">1.11) How can I learn
<SMALL>SQL</SMALL>?</H3>
<P>First, consider the PostgreSQL-specific books mentioned above.
@ -292,13 +363,13 @@
and at <A href=
"http://sqlcourse.com/">http://sqlcourse.com.</A></P>
<H3><A name="1.11">1.11</A>) How do I join the development
<H3 id="item1.12">1.12) How do I join the development
team?</H3>
<P>See the <a href="http://www.postgresql.org/docs/faqs.FAQ_DEV.html">
Developer's FAQ</A>.</P>
<H3><A name="1.12">1.12</A>) How does PostgreSQL compare to other
<H3 id="item1.13">1.13) How does PostgreSQL compare to other
<SMALL>DBMS</SMALL>s?</H3>
<P>There are several ways of measuring software: features,
@ -345,7 +416,7 @@
community, manuals, and the source code often make PostgreSQL
support superior to other <SMALL>DBMS</SMALL>s. There is
commercial per-incident support available for those who need it.
(See <A href="#1.5">FAQ section 1.5</A>.)<BR>
(See <A href="#item1.7">FAQ section 1.7</A>.)<BR>
<BR>
</DD>
@ -358,23 +429,11 @@
</DD>
</DL>
<H3><A name="1.13">1.13</A>) Who controls PostgreSQL?<BR>
<P>If you are looking for a PostgreSQL gatekeeper, central committee,
or controlling company, give up --- there isn't one. We do have a
core committee and CVS committers, but these groups are more for
administrative purposes than control. The project is directed by
the community of developers and users, which anyone can join. All
you need to do is subscribe to the mailing lists and participate in the
discussions. (See the <a href="http://www.postgresql.org/docs/faqs.FAQ_DEV.html">
Developer's FAQ</A> for information on how to get involved in PostgreSQL
development.)</P>
<HR>
<H2 align="center">User Client Questions</H2>
<H3><A name="2.1">2.1</A>) What interfaces are available for
<H3 id="item2.1">2.1) What interfaces are available for
PostgreSQL?</H3>
<P>The PostgreSQL install includes only the <SMALL>C</SMALL> and embedded
@ -389,7 +448,7 @@
in the <I>Drivers/Interfaces</I> section and via Internet search.
</P>
<H3><A name="2.2">2.2</A>) What tools are available for using
<H3 id="item2.2">2.2) What tools are available for using
PostgreSQL with Web pages?</H3>
<P>A nice introduction to Database-backed Web pages can be seen at:
@ -402,7 +461,7 @@
<P>For complex cases, many use the Perl and DBD::Pg with CGI.pm or
mod_perl.</P>
<H3><A name="2.3">2.3</A>) Does PostgreSQL have a graphical user
<H3 id="item2.3">2.3) Does PostgreSQL have a graphical user
interface?</H3>
<P>Yes, see <a href="http://techdocs.postgresql.org/guides/GUITools">
@ -414,13 +473,13 @@
<H2 align="center">Administrative Questions</H2>
<H3><A name="3.1">3.1</A>) How do I install PostgreSQL somewhere
<H3 id="item3.1">3.1) How do I install PostgreSQL somewhere
other than <I>/usr/local/pgsql</I>?</H3>
<P>Specify the <I>--prefix</I> option when running
<I>configure</I>.</P>
<H3><A name="3.2">3.2</A>) How do I control connections from other
<H3 id="item3.2">3.2) How do I control connections from other
hosts?</H3>
<P>By default, PostgreSQL only allows connections from the local
@ -430,7 +489,7 @@
host-based authentication by modifying the
<I>$PGDATA/pg_hba.conf</I> file, and restart the server.</P>
<H3><A name="3.3">3.3</A>) How do I tune the database engine for
<H3 id="item3.3">3.3) How do I tune the database engine for
better performance?</H3>
<P>There are three major areas for potential performance
@ -487,14 +546,14 @@
</DD>
</DL>
<H3><A name="3.4">3.4</A>) What debugging features are
<H3 id="item3.4">3.4) What debugging features are
available?</H3>
<P>There are many <CODE>log_*</CODE> server configuration variables
that enable printing of query and process statistics which can be
very useful for debugging and performance measurements.</P>
<H3><A name="3.5">3.5</A>) Why do I get <I>"Sorry, too many
<H3 id="item3.5">3.5) Why do I get <I>"Sorry, too many
clients"</I> when trying to connect?</H3>
<P>You have reached the default limit is 100 database sessions. You
@ -503,7 +562,7 @@
<I>max_connections</I> value in <I>postgresql.conf</I> and
restarting the <I>postmaster</I>.</P>
<H3><A name="3.6">3.6</A>) Why do I need to do a dump and restore
<H3 id="item3.6">3.6) Why do I need to do a dump and restore
to upgrade between major PostgreSQL releases?</H3>
<P>The PostgreSQL team makes only small changes between minor releases,
@ -514,7 +573,7 @@
data in a generic format that can then be loaded in using the new internal
format.</P>
<H3><A name="3.7">3.7</A>) What computer hardware should I use?</H3>
<H3 id="item3.7">3.7) What computer hardware should I use?</H3>
<P>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
@ -528,7 +587,7 @@
<H2 align="center">Operational Questions</H2>
<H3><A name="4.1">4.1</A>) How do I <SMALL>SELECT</SMALL> only the
<H3 id="item4.1">4.1) How do I <SMALL>SELECT</SMALL> only the
first few rows of a query? A random row?</H3>
<P>To retrieve only a few rows, if you know at the number of rows
@ -547,7 +606,7 @@
LIMIT 1;
</PRE>
<H3><A name="4.2">4.2</A>) How do I find out what tables, indexes,
<H3 id="item4.2">4.2) How do I find out what tables, indexes,
databases, and users are defined? How do I see the queries used
by <I>psql</I> to display them?</H3>
@ -570,7 +629,7 @@
illustrates many of the <SMALL>SELECT</SMALL>s needed to get
information from the database system tables.</P>
<H3><A name="4.3">4.3</A>) How do you change a column's data type?</H3>
<H3 id="item4.3">4.3) How do you change a column's data type?</H3>
<P>Changing the data type of a column can be done easily in 8.0
and later with <SMALL>ALTER TABLE ALTER COLUMN TYPE</SMALL>.</P>
@ -586,7 +645,7 @@
<P>You might then want to do <I>VACUUM FULL tab</I> to reclaim the
disk space used by the expired rows.</P>
<H3><A name="4.4">4.4</A>) What is the maximum size for a row, a
<H3 id="item4.4">4.4) What is the maximum size for a row, a
table, and a database?</H3>
<P>These are the limits:</P>
@ -623,7 +682,7 @@ table?</TD><TD>unlimited</TD></TR>
of an MD5 hash of the long column, and full text indexing
allows for searching of words within the column.</P>
<H3><A name="4.5">4.5</A>) How much database disk space is required
<H3 id="item4.5">4.5) How much database disk space is required
to store data from a typical text file?</H3>
<P>A PostgreSQL database may require up to five times the disk
@ -660,7 +719,7 @@ table?</TD><TD>unlimited</TD></TR>
<P><SMALL>NULL</SMALL>s are stored as bitmaps, so they
use very little space.</P>
<H3><A name="4.6">4.6</A>) Why are my queries slow? Why don't they
<H3 id="item4.6">4.6) Why are my queries slow? Why don't they
use my indexes?</H3>
<P>Indexes are not used by every query. Indexes are used only if the
@ -711,7 +770,7 @@ table?</TD><TD>unlimited</TD></TR>
e.g. [a-e].</LI>
<LI>Case-insensitive searches such as <SMALL>ILIKE</SMALL> and
<I>~*</I> do not utilize indexes. Instead, use expression
indexes, which are described in section <a href="#4.8">4.8</a>.</LI>
indexes, which are described in section <a href="#item4.8">4.8</a>.</LI>
<LI>The default <I>C</I> locale must be used during
<i>initdb</i> because it is not possible to know the next-greatest
character in a non-C locale. You can create a special
@ -724,12 +783,12 @@ table?</TD><TD>unlimited</TD></TR>
types exactly match the index's column types. This was particularly
true of int2, int8, and numeric column indexes.</P>
<H3><A name="4.7">4.7</A>) How do I see how the query optimizer is
<H3 id="item4.7">4.7) How do I see how the query optimizer is
evaluating my query?</H3>
<P>See the <SMALL>EXPLAIN</SMALL> manual page.</P>
<H3><A name="4.8">4.8</A>) How do I perform regular expression
<H3 id="item4.8">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?</H3>
@ -756,7 +815,7 @@ table?</TD><TD>unlimited</TD></TR>
case to be stored in the column, use a <SMALL>CHECK</SMALL>
constraint or a trigger.</P>
<H3><A name="4.9">4.9</A>) In a query, how do I detect if a field
<H3 id="item4.9">4.9) In a query, how do I detect if a field
is <SMALL>NULL</SMALL>? How can I sort on whether a field is <SMALL>
NULL</SMALL> or not?</H3>
@ -780,7 +839,7 @@ table?</TD><TD>unlimited</TD></TR>
ORDER BY (col IS NOT NULL)
</PRE>
<H3><A name="4.10">4.10</A>) What is the difference between the
<H3 id="item4.10">4.10) What is the difference between the
various character types?</H3>
<BLOCKQUOTE>
<TABLE>
@ -816,7 +875,7 @@ length</TD></TR>
particularly values that include <SMALL>NULL</SMALL> bytes. All the
types described here have similar performance characteristics.</P>
<H3><A name="4.11.1">4.11.1</A>) How do I create a
<H3 id="item4.11.1">4.11.1) How do I create a
serial/auto-incrementing field?</H3>
<P>PostgreSQL supports a <SMALL>SERIAL</SMALL> data type. It
@ -841,13 +900,13 @@ length</TD></TR>
See the <I>create_sequence</I> manual page for more information
about sequences.
<H3><A name="4.11.2">4.11.2</A>) How do I get the value of a
<H3 id="item4.11.2">4.11.2) How do I get the value of a
<SMALL>SERIAL</SMALL> insert?</H3>
<P>One approach is to retrieve the next <SMALL>SERIAL</SMALL> value
from the sequence object with the <I>nextval()</I> function
<I>before</I> inserting and then insert it explicitly. Using the
example table in <A href="#4.11.1">4.11.1</A>, an example in a
example table in <A href="#item4.11.1">4.11.1</A>, an example in a
pseudo-language would look like this:</P>
<PRE>
new_id = execute("SELECT nextval('person_id_seq')");
@ -870,13 +929,13 @@ length</TD></TR>
new_id = execute("SELECT currval('person_id_seq')");
</PRE>
<H3><A name="4.11.3">4.11.3</A>) Doesn't <I>currval()</I>
<H3 id="item4.11.3">4.11.3) Doesn't <I>currval()</I>
lead to a race condition with other users?</H3>
<P>No. <I>currval()</I> returns the current value assigned by your
session, not by all sessions.</P>
<H3><A name="4.11.4">4.11.4</A>) Why aren't my sequence numbers
<H3 id="item4.11.4">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?</H3>
@ -885,7 +944,7 @@ length</TD></TR>
completes. This causes gaps in numbering from aborted
transactions.</P>
<H3><A name="4.12">4.12</A>) What is an <SMALL>OID</SMALL>? What is
<H3 id="item4.12">4.12) What is an <SMALL>OID</SMALL>? What is
a <SMALL>CTID</SMALL>?</H3>
<P>Every row that is created in PostgreSQL gets a unique
@ -908,7 +967,7 @@ length</TD></TR>
are modified or reloaded. They are used by index entries to point
to physical rows.</P>
<H3><A name="4.13">4.13</A>) Why do I get the error <I>"ERROR:
<H3 id="item4.13">4.13) Why do I get the error <I>"ERROR:
Memory exhausted in AllocSetAlloc()"</I>?</H3>
<P>You probably have run out of virtual memory on your system,
@ -927,12 +986,12 @@ length</TD></TR>
backend is returning too much data, try it before starting the
client.
<H3><A name="4.14">4.14</A>) How do I tell what PostgreSQL version
<H3 id="item4.14">4.14) How do I tell what PostgreSQL version
I am running?</H3>
<P>From <I>psql</I>, type <CODE>SELECT version();</CODE></P>
<H3><A name="4.15">4.15</A>) How do I create a column that will
<H3 id="item4.15">4.15) How do I create a column that will
default to the current time?</H3>
<P>Use <I>CURRENT_TIMESTAMP</I>:</P>
@ -940,7 +999,7 @@ length</TD></TR>
CREATE TABLE test (x int, modtime TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
</PRE>
<H3><A name="4.16">4.16</A>) How do I perform an outer join?</H3>
<H3 id="item4.16">4.16) How do I perform an outer join?</H3>
<P>PostgreSQL supports outer joins using the SQL standard syntax.
Here are two examples:</P>
@ -963,7 +1022,7 @@ length</TD></TR>
<SMALL>RIGHT</SMALL>, and <SMALL>FULL</SMALL> joins. Ordinary joins
are called <SMALL>INNER</SMALL> joins.</P>
<H3><A name="4.17">4.17</A>) How do I perform queries using
<H3 id="item4.17">4.17) How do I perform queries using
multiple databases?</H3>
<P>There is no way to query a database other than the current one.
@ -975,14 +1034,14 @@ length</TD></TR>
connections to different databases and merge the results on the
client side.</P>
<H3><A name="4.18">4.18</A>) How do I return multiple rows or
<H3 id="item4.18">4.18) How do I return multiple rows or
columns from a function?</H3>
<P>It is easy using set-returning functions,
<a href="http://techdocs.postgresql.org/guides/SetReturningFunctions">
http://techdocs.postgresql.org/guides/SetReturningFunctions</a></P>.
<H3><A name="4.19">4.19</A>) Why do I get "relation with OID #####
<H3 id="item4.19">4.19) Why do I get "relation with OID #####
does not exist" errors when accessing temporary tables in PL/PgSQL
functions?</H3>
@ -994,7 +1053,7 @@ length</TD></TR>
<SMALL>EXECUTE</SMALL> for temporary table access in PL/PgSQL. This
will cause the query to be reparsed every time.</P>
<H3><A name="4.20">4.20</A>) What replication solutions are available?
<H3 id="item4.20">4.20) What replication solutions are available?
</H3>
<P>Though "replication" is a single term, there are several technologies
@ -1016,17 +1075,17 @@ length</TD></TR>
<P>There are also commercial and hardware-based replication solutions
available supporting a variety of replication models.</P>
<H3><A name="4.21">4.21</A>) Why are my table and column names not
<H3 id="item4.21">4.21) Why are my table and column names not
recognized in my query?</H3>
<P>The most common cause is the use of double-quotes around table or
column names during table creation. When double-quotes are used,
table and column names (called identifiers) are stored <a
href="http://www.postgresql.org/docs/8.0/static/sql-syntax.html#SQL-
SYNTAX-IDENTIFIERS">case-sensitive</a>, meaning you must use
double-quotes when referencing the names in a query. Some interfaces,
like pgAdmin, automatically double-quote identifiers during table
creation. So, for identifiers to be recognized, you must either:
href="http://www.postgresql.org/docs/8.0/static/sql-syntax.html#SQL-SYNTAX-IDENTIFIERS">
case-sensitive</a>, meaning you must use double-quotes when
referencing the names in a query. Some interfaces, like pgAdmin,
automatically double-quote identifiers during table creation. So,
for identifiers to be recognized, you must either:
<UL>
<LI>Avoid double-quoting identifiers when creating tables</LI>
<LI>Use only lowercase characters in identifiers</LI>

View File

@ -13,7 +13,7 @@
<H1>Developer's Frequently Asked Questions (FAQ) for
PostgreSQL</H1>
<P>Last updated: Thu Oct 27 09:48:14 EDT 2005</P>
<P>Last updated: Tue Nov 22 10:17:51 EST 2005</P>
<P>Current maintainer: Bruce Momjian (<A href=
"mailto:pgman@candle.pha.pa.us">pgman@candle.pha.pa.us</A>)<BR>
@ -27,51 +27,51 @@
<H2>General Questions</H2>
<A href="#1.1">1.1</A>) How do I get involved in PostgreSQL
<A href="#item1.1">1.1</A>) How do I get involved in PostgreSQL
development?<BR>
<A href="#1.2">1.2</A>) What development environment is required
<A href="#item1.2">1.2</A>) What development environment is required
to develop code?<BR>
<A href="#1.3">1.3</A>) What areas need work?<BR>
<A href="#1.4">1.4</A>) What do I do after choosing an item to
<A href="#item1.3">1.3</A>) What areas need work?<BR>
<A href="#item1.4">1.4</A>) What do I do after choosing an item to
work on?<BR>
<A href="#1.5">1.5</A>) I've developed a patch, what next?<BR>
<A href="#1.6">1.6</A>) Where can I learn more about the code?<BR>
<A href="#1.7">1.7</A>) How do I download/update the current
<A href="#item1.5">1.5</A>) I've developed a patch, what next?<BR>
<A href="#item1.6">1.6</A>) Where can I learn more about the code?<BR>
<A href="#item1.7">1.7</A>) How do I download/update the current
source tree?<BR>
<A href="#1.8">1.8</A>) How do I test my changes?<BR>
<A href="#1.9">1.9</A>) What tools are available for
<A href="#item1.8">1.8</A>) How do I test my changes?<BR>
<A href="#item1.9">1.9</A>) What tools are available for
developers?<BR>
<A href="#1.10">1.10</A>) What books are good for developers?<BR>
<A href="#1.11">1.11</A>) What is configure all about?<BR>
<A href="#1.12">1.12</A>) How do I add a new port?<BR>
<A href="#1.13">1.13</A>) Why don't you use threads, raw
<A href="#item1.10">1.10</A>) What books are good for developers?<BR>
<A href="#item1.11">1.11</A>) What is configure all about?<BR>
<A href="#item1.12">1.12</A>) How do I add a new port?<BR>
<A href="#item1.13">1.13</A>) Why don't you use threads, raw
devices, async-I/O, &lt;insert your favorite wizz-bang feature
here&gt;?<BR>
<A href="#1.14">1.14</A>) How are RPM's packaged?<BR>
<A href="#1.15">1.15</A>) How are CVS branches handled?<BR>
<A href="#1.16">1.16</A>) Where can I get a copy of the SQL
<A href="#item1.14">1.14</A>) How are RPM's packaged?<BR>
<A href="#item1.15">1.15</A>) How are CVS branches handled?<BR>
<A href="#item1.16">1.16</A>) Where can I get a copy of the SQL
standards?<BR>
<A href="#1.17">1.17</A>) Where can I get technical
<A href="#item1.17">1.17</A>) Where can I get technical
assistance?<BR>
<A href="#1.18">1.18</A>) How do I get involved in PostgreSQL web
<A href="#item1.18">1.18</A>) How do I get involved in PostgreSQL web
site development?<BR>
<H2>Technical Questions</H2>
<A href="#2.1">2.1</A>) How do I efficiently access information in
<A href="#item2.1">2.1</A>) How do I efficiently access information in
tables from the backend code?<BR>
<A href="#2.2">2.2</A>) Why are table, column, type, function,
<A href="#item2.2">2.2</A>) Why are table, column, type, function,
view names sometimes referenced as <I>Name</I> or <I>NameData,</I>
and sometimes as <I>char *?</I><BR>
<A href="#2.3">2.3</A>) Why do we use <I>Node</I> and <I>List</I>
<A href="#item2.3">2.3</A>) Why do we use <I>Node</I> and <I>List</I>
to make data structures?<BR>
<A href="#2.4">2.4</A>) I just added a field to a structure. What
<A href="#item2.4">2.4</A>) I just added a field to a structure. What
else should I do?<BR>
<A href="#2.5">2.5</A>) Why do we use <I>palloc</I>() and
<A href="#item2.5">2.5</A>) Why do we use <I>palloc</I>() and
<I>pfree</I>() to allocate memory?<BR>
<A href="#2.6">2.6</A>) What is ereport()?<BR>
<A href="#2.7">2.7</A>) What is CommandCounterIncrement()?<BR>
<A href="#2.8">2.8</A>) What debugging features are available?<BR>
<A href="#item2.6">2.6</A>) What is ereport()?<BR>
<A href="#item2.7">2.7</A>) What is CommandCounterIncrement()?<BR>
<A href="#item2.8">2.8</A>) What debugging features are available?<BR>
<BR>
@ -79,7 +79,7 @@
<H2>General Questions</H2>
<H3><A name="1.1">1.1</A>) How do I get involved in PostgreSQL
<H3 id="item1.1">1.1) How do I get involved in PostgreSQL
development?</H3>
<P>Download the code and have a look around. See <A href=
@ -91,7 +91,7 @@
contributors and core members of the project discuss
development.</P>
<H3><A name="1.2">1.2</A>) What development environment is required
<H3 id="item1.2">1.2) What development environment is required
to develop code?</H3>
<P>PostgreSQL is developed mostly in the C programming language. It
@ -123,7 +123,7 @@
when you make a modification to a C header file, all files depend
upon that file are also rebuilt.</P>
<H3><A name="1.3">1.3</A>) What areas need work?</H3>
<H3 id="item1.3">1.3) What areas need work?</H3>
Outstanding features are detailed in the TODO list. This is located
in <I>doc/TODO</I> in the source distribution or at <A href=
"http://www.postgresql.org/docs/faqs.TODO.html">
@ -134,7 +134,7 @@
archives, the SQL standards and the recommend texts (see <A href=
"#1.10">1.10</A>).</P>
<H3><A name="1.4">1.4</A>) What do I do after choosing an item to
<H3 id="item1.4">1.4) What do I do after choosing an item to
work on?</H3>
<P>Send an email to pgsql-hackers with a proposal for what you want
@ -154,7 +154,7 @@
<a href="http://momjian.postgresql.org/cgi-bin/pgpatches_hold">
http://momjian.postgresql.org/cgi-bin/pgpatches2</a>.</P>
<H3><A name="1.5">1.5</A>) I've developed a patch, what next?</H3>
<H3 id="item1.5">1.5) I've developed a patch, what next?</H3>
<P>Generate the patch in contextual diff format. If you are
unfamiliar with this, you might find the script
@ -174,7 +174,7 @@
that, let us know and we will manually update the documentation when
the patch is applied.</P>
<H3><A name="1.6">1.6</A>) Where can I learn more about the
<H3 id="item1.6">1.6) Where can I learn more about the
code?</H3>
<P>Other than documentation in the source tree itself, you can find
@ -182,7 +182,7 @@
"http://www.postgresql.org/developer">
http://www.postgresql.org/developer</A>.</P>
<H3><A name="1.7">1.7</A>) How do I download/update the current
<H3 id="item1.7">1.7) How do I download/update the current
source tree?</H3>
<P>There are several ways to obtain the source tree. Occasional
@ -197,7 +197,7 @@
"http://developer.postgresql.org/docs/postgres/cvs.html">
http://developer.postgresql.org/docs/postgres/cvs.html</A>.</P>
<H3><A name="1.8">1.8</A>) How do I test my changes?</H3>
<H3 id="item1.8">1.8) How do I test my changes?</H3>
<P><B>Basic system testing</B></P>
@ -245,7 +245,7 @@
you can use the <I>--enable-depend</I> option of <I>configure</I>
to have the compiler compute the dependencies automatically.</P>
<H3><A name="1.9">1.9</A>) What tools are available for
<H3 id="item1.9">1.9) What tools are available for
developers?</H3>
<P>First, all the files in the <I>src/tools</I> directory are
@ -380,7 +380,7 @@
There is also a script called <I>unused_oids</I> in
<I>pgsql/src/include/catalog</I> that shows the unused oids.</P>
<H3><A name="1.10">1.10</A>) What books are good for
<H3 id="item1.10">1.10) What books are good for
developers?</H3>
<P>I have four good books, <I>An Introduction to Database
@ -394,7 +394,7 @@
on-line written by Jim Gray at <A href=
"http://www.benchmarkresources.com">http://www.benchmarkresources.com.</A>.</P>
<H3><A name="1.11">1.11</A>) What is configure all about?</H3>
<H3 id="item1.11">1.11) What is configure all about?</H3>
<P>The files <I>configure</I> and <I>configure.in</I> are part of
the GNU <I>autoconf</I> package. Configure allows us to test for
@ -418,7 +418,7 @@
all files derived by configure are removed, so you see only the
file contained in the source distribution.</P>
<H3><A name="1.12">1.12</A>) How do I add a new port?</H3>
<H3 id="item1.12">1.12) How do I add a new port?</H3>
<P>There are a variety of places that need to be modified to add a
new port. First, start in the <I>src/template</I> directory. Add an
@ -437,7 +437,7 @@
handling. There is a <I>backend/port</I> directory if you need
special files for your OS.</P>
<H3><A name="1.13">1.13</A>) Why don't you use threads, raw
<H3 id="item1.13">1.13) Why don't you use threads, raw
devices, async-I/O, &lt;insert your favorite wizz-bang feature
here&gt;?</H3>
@ -471,7 +471,7 @@
cautious about their adoption. The TODO list often contains links
to discussions showing our reasoning in these areas.</P>
<H3><A name="1.14">1.14</A>) How are RPMs packaged?</H3>
<H3 id="item1.14">1.14) How are RPMs packaged?</H3>
<P>This was written by Lamar Owen:</P>
@ -576,7 +576,7 @@
<P>Of course, there are many projects that DO include all the files
necessary to build RPMs from their Official Tarball (TM).</P>
<H3><A name="1.15">1.15</A>) How are CVS branches managed?</H3>
<H3 id="item1.15">1.15) How are CVS branches managed?</H3>
<P>This was written by Tom Lane:</P>
@ -646,7 +646,7 @@
dot-release or two, so that we won't have to double-patch the first
wave of fixes.</P>
<H3><A name="1.16">1.16</A>) Where can I get a copy of the SQL
<H3 id="item1.16">1.16) Where can I get a copy of the SQL
standards?</H3>
<P>There are three versions of the SQL standard: SQL-92, SQL:1999,
@ -683,7 +683,7 @@
(paper)</LI>
</UL>
<H3><A name="1.17">1.17</A>) Where can I get technical
<H3 id="item1.17">1.17) Where can I get technical
assistance?</H3>
<P>Many technical questions held by those new to the code have been
@ -698,7 +698,7 @@
questions about development of new features, on IRC at
irc.freenode.net in the #postgresql channel.</P>
<H3><A name="1.18">1.18</A>) How do I get involved in PostgreSQL
<H3 id="item1.18">1.18) How do I get involved in PostgreSQL
web site development?</H3>
<P>PostgreSQL website development is discussed on the
@ -714,7 +714,7 @@
<H2>Technical Questions</H2>
<H3><A name="2.1">2.1</A>) How do I efficiently access information
<H3 id="item2.1">2.1) How do I efficiently access information
in tables from the backend code?</H3>
<P>You first need to find the tuples(rows) you are interested in.
@ -782,7 +782,7 @@
<I>ReleaseBuffer()</I>, in the <I>heap_fetch()</I> case. Or it may
be a palloc'ed tuple, that you must <I>pfree()</I> when finished.
<H3><A name="2.2">2.2</A>) Why are table, column, type, function,
<H3 id="item2.2">2.2) Why are table, column, type, function,
view names sometimes referenced as <I>Name</I> or <I>NameData,</I>
and sometimes as <I>char *?</I></H3>
@ -809,7 +809,7 @@
names(char *), there are many cases where Name and char * are used
interchangeably.</P>
<H3><A name="2.3">2.3</A>) Why do we use <I>Node</I> and
<H3 id="item2.3">2.3) Why do we use <I>Node</I> and
<I>List</I> to make data structures?</H3>
<P>We do this because this allows a consistent way to pass data
@ -902,7 +902,7 @@
The output appears in the postmaster log file, or on your screen if
you are running a backend directly without a postmaster.
<H3><A name="2.4">2.4</A>) I just added a field to a structure.
<H3 id="item2.4">2.4) I just added a field to a structure.
What else should I do?</H3>
<P>The structures passing around from the parser, rewrite,
@ -912,9 +912,9 @@
the files <I>copyfuncs.c</I> and <I>equalfuncs.c</I>. Make sure you
add support for your new field to these files. Find any other
places the structure might need code for your new field. <I>mkid</I>
is helpful with this (see <A href="#1.9">1.9</A>).</P>
is helpful with this (see <A href="#item1.9">1.9</A>).</P>
<H3><A name="2.5">2.5</A>) Why do we use <I>palloc</I>() and
<H3 id="item2.5">2.5) Why do we use <I>palloc</I>() and
<I>pfree</I>() to allocate memory?</H3>
<P><I>palloc()</I> and <I>pfree()</I> are used in place of malloc()
@ -925,7 +925,7 @@
memory can be allocated in. These affect when the allocated memory
is freed by the backend.</P>
<H3><A name="2.6">2.6</A>) What is ereport()?</H3>
<H3 id="item2.6">2.6) What is ereport()?</H3>
<P><I>ereport()</I> is used to send messages to the front-end, and
optionally terminate the current query being processed. The first
@ -944,7 +944,7 @@
descriptors so you don't need to clean these up before the
call.</P>
<H3><A name="2.7">2.7</A>) What is CommandCounterIncrement()?</H3>
<H3 id="item2.7">2.7) What is CommandCounterIncrement()?</H3>
<P>Normally, transactions can not see the rows they modify. This
allows <CODE>UPDATE foo SET x = x + 1</CODE> to work correctly.</P>
@ -957,7 +957,7 @@
increments the Command Counter, creating a new part of the
transaction.</P>
<H3><A name="2.8">2.8</A>) What debugging features are
<H3 id="item2.8">2.8) What debugging features are
available?</H3>
<P>First, try running <I>configure</I> with the --enable-cassert
@ -984,7 +984,7 @@
Use a debugger to attach to the <I>postgres</I> <SMALL>PID</SMALL>.
You can set breakpoints in the debugger and issue queries from the
other. If you are looking to find the location that is generating
an error or log message, set a breakpoint at <I>errfinish</>.
an error or log message, set a breakpoint at <I>errfinish</I>.
<I>psql</I>. If you are debugging <I>postgres</I> startup, you can
set PGOPTIONS="-W n", then start <I>psql</I>. This will cause startup