Fix misspelling of disbursion to dispersion.
Remove call to difftime() in timestamp support to fix SunOS(Bruce & Thomas)
Changes for Digital Unix
Portability fix for pg_dumpall(Bruce)
-Rename pg_attribute.attnvals to attdisbursion(Bruce)
+Rename pg_attribute.attnvals to attdispersion(Bruce)
"intro/unix" manual page now "pgintro"(Bruce)
"built-in" manual page now "pgbuiltin"(Bruce)
"drop" manual page now "drop_table"(Bruce)
* allow configuration of maximum number of open files
* Remove pg_listener index
* Remove ANALYZE from VACUUM so it can be run separately without locks
-* Gather more accurate disbursion statistics using indexes
+* Gather more accurate dispersion statistics using indexes
* Improve statistics storage in pg_class [performance]
* Improve VACUUM speed with indexes [vacuum]
* -BSD/OS does not support locale because there is no LC_MESSAGES (Bruce)
{
float32data nvals;
- nvals = getattdisbursion(relid, (int) attno);
+ nvals = getattdispersion(relid, (int) attno);
! if (nvals == 0)
*result = 1.0 / 3.0;
else
{
float32data nvals;
- nvals = getattdisbursion(relid, (int) attno);
+ nvals = getattdispersion(relid, (int) attno);
! if (nvals == 0) {
*result = 1.0 / 3.0;
+ }
Received: from renoir.op.net (root@renoir.op.net [207.29.195.4])
by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id TAA00672
for <pgman@candle.pha.pa.us>; Thu, 20 Jan 2000 19:45:30 -0500 (EST)
-Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.14 $) with ESMTP id TAA01989 for <pgman@candle.pha.pa.us>; Thu, 20 Jan 2000 19:39:15 -0500 (EST)
+Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.15 $) with ESMTP id TAA01989 for <pgman@candle.pha.pa.us>; Thu, 20 Jan 2000 19:39:15 -0500 (EST)
Received: from localhost (majordom@localhost)
by hub.org (8.9.3/8.9.3) with SMTP id TAA00957;
Thu, 20 Jan 2000 19:35:19 -0500 (EST)
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.21 2000/10/05 16:57:23 petere Exp $
+# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.22 2000/10/05 19:48:16 momjian Exp $
#
#----------------------------------------------------------------------------
pgaccess-ref.sgml \
pgadmin-ref.sgml \
pg-config-ref.sgml \
- pgctl-ref.sgml \
+ pg_ctl-ref.sgml \
pgtclsh.sgml \
pgtksh.sgml \
postgres-ref.sgml \
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/allfiles.sgml,v 1.21 2000/08/26 13:08:15 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/allfiles.sgml,v 1.22 2000/10/05 19:48:17 momjian Exp $
Postgres documentation
Complete list of usable sgml source files in this directory.
-->
<!entity pgAccess system "pgaccess-ref.sgml">
<!entity pgAdmin system "pgadmin-ref.sgml">
<!entity pgConfig system "pg-config-ref.sgml">
-<!entity pgCtl system "pgctl-ref.sgml">
+<!entity pgCtl system "pg_ctl-ref.sgml">
<!entity pgDump system "pg_dump.sgml">
<!entity pgDumpall system "pg_dumpall.sgml">
<!entity pgPasswd system "pg_passwd.sgml">
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_table.sgml,v 1.14 2000/07/22 02:39:10 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_table.sgml,v 1.15 2000/10/05 19:48:17 momjian Exp $
Postgres documentation
-->
<para>
Removes a table constraint (such as a check constraint,
unique constraint, or foreign key constraint). To
- remove a unique constraint, drop a unique index,
+ remove a unique constraint, drop a unique index.
To remove other kinds of constraints you need to recreate
and reload the table, using other parameters to the
<xref linkend="SQL-CREATETABLE" endterm="SQL-CREATETABLE-title">
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/copy.sgml,v 1.17 2000/07/22 02:39:10 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/copy.sgml,v 1.18 2000/10/05 19:48:17 momjian Exp $
Postgres documentation
-->
You must have <firstterm>select access</firstterm> on any table
whose values are read by
<command>COPY</command>, and either
- <firstterm>insert or update access</firstterm> to a
+ <firstterm>insert</firstterm> or <firstterm>update access</firstterm> to a
table into which values are being inserted by <command>COPY</command>.
The backend also needs appropriate Unix permissions for any file read
or written by <command>COPY</command>.
<para>
The actual format for each instance is
<programlisting>
-<attr1><<replaceable class=parameter>separator</replaceable>><attr2><<replaceable class=parameter>separator</replaceable>>...<<replaceable class=parameter>separator</replaceable>><attr<replaceable class="parameter">n</replaceable>><newline>
+<attr1><<replaceable class=parameter>separator</replaceable>><attr2><<replaceable class=parameter>separator</replaceable>>...<<replaceable class=parameter>separator</replaceable>><attr<replaceable class="parameter">n</replaceable>><newline>.
</programlisting>
The oid is placed on the beginning of the line
if WITH OIDS is specified.
In the case of <command>COPY BINARY</command>, the first four
bytes in the file will be the number of instances in the file. If
this number is zero, the <command>COPY BINARY</command> command
- will read until end of file is encountered. Otherwise, it will
+ will read until end-of-file is encountered. Otherwise, it will
stop reading when this number of instances has been read.
Remaining data in the file will be ignored.
</para>
COPY country TO <filename>stdout</filename> USING DELIMITERS '|';
</programlisting>
<para>
- To copy data from a Unix file into a table "country":
+ To copy data from a Unix file into a table country:
</para>
<programlisting>
COPY country FROM '/usr1/proj/bray/sql/country_data';
\.
</programlisting>
<para>
- The same data, output in binary format on a Linux/i586 machine.
+ The following is the same data, output in binary format on a Linux/i586 machine.
The data is shown after filtering through
the Unix utility <command>od -c</command>. The table has
three fields; the first is <classname>char(2)</classname>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_aggregate.sgml,v 1.11 2000/09/12 20:52:07 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_aggregate.sgml,v 1.12 2000/10/05 19:48:17 momjian Exp $
Postgres documentation
-->
for base types such as <function>min(int4)</function>
and <function>avg(float8)</function> are already provided in the base
distribution. If one defines new types or needs an aggregate function not
- already provided then <command>CREATE AGGREGATE</command>
+ already provided, then <command>CREATE AGGREGATE</command>
can be used to provide the desired features.
</para>
<para>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_database.sgml,v 1.14 2000/05/02 20:02:03 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_database.sgml,v 1.15 2000/10/05 19:48:17 momjian Exp $
Postgres documentation
-->
<listitem>
<para>
The expansion of the specified <replaceable class="parameter">dbpath</replaceable>
- (see below how) failed. Check the path you entered or make sure that the
+ (see below) failed. Check the path you entered or make sure that the
environment variable you are referencing does exist.
</para>
</listitem>
<para>
These are most likely related to insufficient permissions on the data
directory, a full disk, or other file system problems. The user under
- which the database server is running, must have access to the location.
+ which the database server is running must have access to the location.
</para>
</listitem>
</varlistentry>
If the server is compiled with <literal>ALLOW_ABSOLUTE_DBPATHS</literal>
(not so by default), absolute path names, as identified by
a leading slash
- (e.g. '<filename>/usr/local/pgsql/data</filename>'),
+ (e.g., '<filename>/usr/local/pgsql/data</filename>'),
are allowed as well.
</para>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_function.sgml,v 1.17 2000/08/25 15:17:50 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_function.sgml,v 1.18 2000/10/05 19:48:17 momjian Exp $
Postgres documentation
-->
The data type(s) of the function's arguments, if any.
The input types may be base or complex types, or
<firstterm>opaque</firstterm>.
- <literal>opaque</literal> indicates that the function
+ <literal>Opaque</literal> indicates that the function
accepts arguments of a non-SQL type such as <type>char *</type>.
</para>
</listitem>
<para>
The return data type.
The output type may be specified as a base type, complex type,
- <option>setof <replaceable class="parameter">type</replaceable></option>,
+ <option>setof type</option>,
or <option>opaque</option>.
The <option>setof</option>
modifier indicates that the function will return a set of items,
<listitem>
<para>
This form of the <command>AS</command> clause is used for
- dynamically-linked, C language functions when the function name in
+ dynamically linked, C language functions when the function name in
the C language source code is not the same as the name of the SQL
function. The string <replaceable
class="parameter">obj_file</replaceable> is the name of the file
<term><replaceable class="parameter">langname</replaceable></term>
<listitem>
<para>
- may be '<literal>sql</literal>',
+ May be '<literal>sql</literal>',
'<literal>C</literal>', '<literal>newC</literal>',
'<literal>internal</literal>', '<literal>newinternal</literal>',
or '<replaceable class="parameter">plname</replaceable>',
<term>iscachable</term>
<listitem>
<para>
- <option>iscachable</option> indicates that the function always
+ <option>Iscachable</option> indicates that the function always
returns the same result when given the same argument values (i.e.,
it does not do database lookups or otherwise use information not
directly present in its parameter list). The optimizer uses
<para>
The full <acronym>SQL92</acronym> type syntax is allowed for
input arguments and return value. However, some details of the
- type specification (e.g. the precision field for
+ type specification (e.g., the precision field for
<type>numeric</type> types) are the responsibility of the
underlying function implementation and are silently swallowed
(i.e., not recognized or
errors at link time. To get around that, give them different C names
(for example, use the argument types as part of the C names), then
specify those names in the AS clause of <command>CREATE FUNCTION</command>.
- If the AS clause is left empty then <command>CREATE FUNCTION</command>
+ If the AS clause is left empty, then <command>CREATE FUNCTION</command>
assumes the C name of the function is the same as the SQL name.
</para>
<para>
This example creates a function that does type conversion between the
- user defined type complex, and the internal type point. The
+ user-defined type complex, and the internal type point. The
function is implemented by a dynamically loaded object that was
compiled from C source. For <productname>Postgres</productname> to
find a type conversion function automatically, the sql function has
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_index.sgml,v 1.15 2000/09/12 20:52:08 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_index.sgml,v 1.16 2000/10/05 19:48:17 momjian Exp $
Postgres documentation
-->
<literal>bigbox_ops</literal> both support rtree indices on the
<literal>box</literal> data type.
The difference between them is that <literal>bigbox_ops</literal>
- scales box coordinates down, to avoid floating point exceptions from
+ scales box coordinates down, to avoid floating-point exceptions from
doing multiplication, addition, and subtraction on very large
floating-point coordinates. If the field on which your rectangles lie
is about 20,000 units square or larger, you should use
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_language.sgml,v 1.11 2000/08/24 23:36:29 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_language.sgml,v 1.12 2000/10/05 19:48:17 momjian Exp $
Postgres documentation
-->
<para>
The call handler for a procedural language must be written
- in a compiled language such as 'C' and registered with
+ in a compiled language such as C and registered with
<productname>Postgres</productname> as a function taking
no arguments and returning the
<type>opaque</type> type, a placeholder for unspecified or undefined types.
<filename>pg_proc</filename> table entry. This may be the
source text in the procedural
language itself (like for PL/Tcl), a pathname to a
- file or anything else that tells the call handler what to
+ file, or anything else that tells the call handler what to
do in detail.
</para>
Usage
</title>
<para>
- This is a template for a PL handler written in 'C':
+ This is a template for a PL handler written in C:
<programlisting>
#include "executor/spi.h"
#include "commands/trigger.h"
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_rule.sgml,v 1.18 2000/07/22 02:39:10 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_rule.sgml,v 1.19 2000/10/05 19:48:17 momjian Exp $
Postgres documentation
-->
<listitem>
<para>
Any SQL WHERE clause, <literal>new</literal> or
- <literal>old</literal> can appear instead of an instance
+ <literal>old</literal>, can appear instead of an instance
variable whenever an instance variable is permissible in SQL.
</para>
</listitem>
<listitem>
<para>
Any SQL statement, <literal>new</literal> or
- <literal>old</literal> can appear instead of an instance
+ <literal>old</literal>, can appear instead of an instance
variable whenever an instance variable is permissible in SQL.
</para>
</listitem>
<para>
The semantics of a rule is that at the time an individual instance is
- accessed, inserted, updated, or deleted, there is a old instance (for
+ accessed, inserted, updated, or deleted, there is an old instance (for
selects, updates and deletes) and a new instance (for inserts and
updates).
If the <replaceable class="parameter">event</replaceable>
<replaceable class="parameter">condition</replaceable> part of the rule
occurs. Alternately, the
<replaceable class="parameter">action</replaceable> part will be done
- instead of the user command. In this later case, the
+ instead of the user command. In this latter case, the
<replaceable class="parameter">action</replaceable> can be the keyword
<literal>NOTHING</literal>.
</para>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_sequence.sgml,v 1.13 2000/07/21 04:25:05 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_sequence.sgml,v 1.14 2000/10/05 19:48:17 momjian Exp $
Postgres documentation
-->
The <option>CACHE <replaceable class="parameter">cache</replaceable></option> option
enables sequence numbers to be preallocated
and stored in memory for faster access. The minimum
- value is 1 (only one value can be generated at a time, i.e. no cache)
+ value is 1 (only one value can be generated at a time, i.e., no cache)
and this is also the default.
</para>
</listitem>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table.sgml,v 1.34 2000/08/24 23:36:29 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table.sgml,v 1.35 2000/10/05 19:48:17 momjian Exp $
Postgres documentation
-->
PRIMARY KEY clause may be specified for a table;
PRIMARY KEY <replaceable>column</replaceable> (a table
constraint) and PRIMARY KEY (a column constraint)
- are mutually exclusive.. See the table constraint clause for
+ are mutually exclusive. See the table constraint clause for
more information.
</para>
</listitem>
<computeroutput>
ERROR: Relation '<replaceable class="parameter">table</replaceable>' already exists
</computeroutput>
- which occurs at runtime, if the table specified already exists
+ , which occurs at runtime if the table specified already exists
in the database.
</para>
</listitem>
NOT NULL constraint, does not violate a UNIQUE constraint. (This
deviates from the <acronym>SQL92</acronym> definition, but is a
more sensible convention. See the section on compatibility for more
- details.).
+ details.)
</para>
<para>
Each UNIQUE column constraint must name a column that is
</computeroutput></term>
<listitem>
<para>
- This occurs at run-time if one tries to insert a duplicate value into
+ This occurs at runtime if one tries to insert a duplicate value into
a column subject to a PRIMARY KEY constraint.
</para>
</listitem>
<para>
<productname>Postgres</productname> automatically creates
a unique index to assure
- data integrity. (See CREATE INDEX statement)
+ data integrity (see CREATE INDEX statement).
</para>
<para>
The PRIMARY KEY constraint should name a set of columns that is
values in a referenced column of a referenced table.
</para>
<para>
- A value added to this column are matched against the values of the
+ A value added to this column is matched against the values of the
referenced table and referenced column using the given match type.
In addition, when the referenced column data is changed, actions
are run upon this column's matching data.
<title>Description</title>
<para>
The PRIMARY KEY constraint specifies a rule that a group of one
- or more distinct columns of a table may contain only unique,
- (non duplicate), non-null values. The column definitions of
+ or more distinct columns of a table may contain only unique
+ (nonduplicate), non-null values. The column definitions of
the specified columns do not have to include a NOT NULL
constraint to be included in a PRIMARY KEY constraint.
</para>
default match type if none is specified. MATCH FULL will not
allow one column of a multi-column foreign key to be NULL
unless all foreign key columns are NULL. The default MATCH type
- allows a some foreign key columns to be NULL while other parts
+ allows some foreign key columns to be NULL while other parts
of the foreign key are not NULL. MATCH PARTIAL is currently not
supported.
</para>
<title>Description</title>
<para>
The FOREIGN KEY constraint specifies a rule that a group of one
- or more distinct columns of a table are related to a group
+ or more distinct columns of a table is related to a group
of distinct columns in the referenced table.
</para>
SQL92
</title>
<para>
- In addition to the locally-visible temporary table, SQL92 also defines a
+ In addition to the locally visible temporary table, SQL92 also defines a
CREATE GLOBAL TEMPORARY TABLE statement, and optionally an
ON COMMIT clause:
<synopsis>
</note>
</para>
<para>
- An assertion is a special type of integrity constraint and share
+ An assertion is a special type of integrity constraint and shares
the same namespace as other constraints. However, an assertion is
not necessarily dependent on one particular base table as
constraints are, so SQL-92 provides the CREATE ASSERTION statement
</listitem>
</varlistentry>
</variablelist>
- </para>
- <para>
- SET CONSTRAINT changes the foreign key constraint mode only for
- the current transaction.
+ <para>
+ <term>SET CONSTRAINT</term> changes the foreign key constraint mode
+ only for the current transaction.
+ </para>
<variablelist>
<varlistentry>
<term>INITIALLY IMMEDIATE</term>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_trigger.sgml,v 1.11 2000/09/12 05:30:06 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_trigger.sgml,v 1.12 2000/10/05 19:48:18 momjian Exp $
Postgres documentation
-->
operation is attempted on a tuple (before constraints
are checked and the <command>INSERT</command>, <command>UPDATE</command> or
<command>DELETE</command> is attempted) or
- AFTER the operation has been attempted (e.g. after constraints
+ AFTER the operation has been attempted (e.g., after constraints
are checked and the <command>INSERT</command>,
<command>UPDATE</command> or <command>DELETE</command> has
completed). If the
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_type.sgml,v 1.14 2000/09/12 20:52:08 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_type.sgml,v 1.15 2000/10/05 19:48:18 momjian Exp $
Postgres documentation
-->
in which case Postgres assumes that the new type has the
same format
as the Postgres-supplied data type, "<literal>text</literal>".
- To indicate that a type is variable-length, set
+ To indicate that a type is variable length, set
<replaceable class="parameter">internallength</replaceable>
to <option>VARIABLE</option>.
The external representation is similarly specified using the
To indicate that a type is an array and to indicate that a
type has array elements, indicate the type of the array
element using the element keyword. For example, to define
- an array of 4 byte integers ("int4"), specify
+ an array of 4-byte integers ("int4"), specify
<programlisting>ELEMENT = int4</programlisting>
</para>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/declare.sgml,v 1.9 2000/06/28 03:30:54 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/declare.sgml,v 1.10 2000/10/05 19:48:18 momjian Exp $
Postgres documentation
-->
<term><replaceable class="parameter">cursorname</replaceable></term>
<listitem>
<para>
- The name of the cursor to be used in subsequent FETCH operations..
+ The name of the cursor to be used in subsequent FETCH operations.
</para>
</listitem>
</varlistentry>
<listitem>
<para>
<acronym>SQL92</acronym> keyword indicating that the cursor will be used
- in a readonly mode. Since this is the only cursor access mode
+ in a read only mode. Since this is the only cursor access mode
available in <productname>Postgres</productname> this keyword has no effect.
</para>
</listitem>
and <emphasis><productname>Postgres</productname> does not resolve
byte ordering or representation issues for binary cursors</emphasis>.
Therefore, if your client machine and server machine use different
- representations (e.g. "big-endian" versus "little-endian"),
+ representations (e.g., "big-endian" versus "little-endian"),
you will probably not want your data returned in
binary format.
However, binary cursors may be a
interactively.
<acronym>SQL92</acronym> allows embedded or modular cursors to
update database information.
- All <productname>Postgres</productname> cursors are readonly.
+ All <productname>Postgres</productname> cursors are read only.
The BINARY keyword is a <productname>Postgres</productname> extension.
</para>
</refsect2>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_database.sgml,v 1.9 1999/12/12 05:15:09 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_database.sgml,v 1.10 2000/10/05 19:48:18 momjian Exp $
Postgres documentation
-->
<term><computeroutput>ERROR: dropdb: cannot be executed on an open database</computeroutput></term>
<listitem>
<para>
- You cannot be connected to the the database your are about to remove.
+ You cannot be connected to the database your are about to remove.
Instead, you could connect to <literal>template1</literal> or any other
database and run this command again.
</para>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_operator.sgml,v 1.6 1999/07/22 15:09:10 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_operator.sgml,v 1.7 2000/10/05 19:48:18 momjian Exp $
Postgres documentation
-->
</computeroutput></term>
<listitem>
<para>
- This message occurs if the specified left unary operator
+ This message occurs if the left unary operator
specified does not exist.
</para>
</listitem>
</computeroutput></term>
<listitem>
<para>
- This message occurs if the specified right unary operator
+ This message occurs if the right unary operator
specified does not exist.
</para>
</listitem>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_rule.sgml,v 1.6 1999/07/22 15:09:10 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_rule.sgml,v 1.7 2000/10/05 19:48:18 momjian Exp $
Postgres documentation
-->
</computeroutput></term>
<listitem>
<para>
- Message returned if successfully.
+ Message returned if successful.
</para>
</listitem>
</varlistentry>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/ecpg-ref.sgml,v 1.4 2000/09/12 20:58:14 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/ecpg-ref.sgml,v 1.5 2000/10/05 19:48:18 momjian Exp $
Postgres documentation
-->
from C statements, sqlca (which includes the sqlca.h
header file) MUST be lowercase. This is because the EXEC SQL
prefix indicates that this INCLUDE will be parsed by ecpg.
- ecpg observes case sensitivity (SQLCA.h will not be found.)
+ ecpg observes case sensitivity (SQLCA.h will not be found).
<command>EXEC SQL INCLUDE</command>
can be used to include other header files
as long as case sensitivity is observed.
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/explain.sgml,v 1.10 2000/08/29 20:02:09 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/explain.sgml,v 1.11 2000/10/05 19:48:18 momjian Exp $
Postgres documentation
-->
<para>
This command displays the execution plan that the Postgres planner
generates for the supplied query. The execution plan shows how
- the table(s) referenced by the query will be scanned --- by plain
- sequential scan, index scan etc --- and if multiple tables are
+ the table(s) referenced by the query will be scanned---by plain
+ sequential scan, index scan, etc.---and if multiple tables are
referenced, what join algorithms will be used to bring together
the required tuples from each input table.
</para>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/fetch.sgml,v 1.12 2000/07/22 04:30:27 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/fetch.sgml,v 1.13 2000/10/05 19:48:18 momjian Exp $
Postgres documentation
-->
<listitem>
<para>
<replaceable class="PARAMETER">selector</replaceable>
- defines the fetch direction. It can be one
+ defines the fetch direction. It can be one of
the following:
<variablelist>
<term><replaceable class="PARAMETER">#</replaceable></term>
<listitem>
<para>
- A signed integer that specify how many rows to fetch.
+ A signed integer that specifies how many rows to fetch.
Note that a negative integer is equivalent to changing the sense of
FORWARD and BACKWARD.
</para>
<acronym>SQL92</acronym> allows one to repetitively retrieve the cursor
at its "current position" using the syntax
<synopsis>
-FETCH RELATIVE 0 FROM <replaceable class="PARAMETER">cursor</replaceable>
+FETCH RELATIVE 0 FROM <replaceable class="PARAMETER">cursor</replaceable>.
</synopsis>
</para>
<productname>Postgres</productname> does not currently support
this notion; in fact the value zero is reserved to indicate that
all rows should be retrieved and is equivalent to specifying the ALL keyword.
- If the RELATIVE keyword has been used, the <productname>Postgres</productname>
+ If the RELATIVE keyword has been used, <productname>Postgres</productname>
assumes that the user intended <acronym>SQL92</acronym> behavior
and returns this error message.
</para>
The following examples traverses a table using a cursor.
<programlisting>
--- set up and use a cursor:
+-- Set up and use a cursor:
BEGIN WORK;
DECLARE liahona CURSOR FOR SELECT * FROM films;
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/grant.sgml,v 1.8 2000/04/09 12:14:25 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/grant.sgml,v 1.9 2000/10/05 19:48:18 momjian Exp $
Postgres documentation
-->
</term>
<listitem>
<para>
- The name of a user to whom grant privileges. PUBLIC is a short form
+ The name of a user to whom to grant privileges. PUBLIC is a short form
representing all users.
</para>
</listitem>
<para>
Currently, to grant privileges in <productname>Postgres</productname>
- to only few columns, you must
+ to only a few columns, you must
create a view having desired columns and then grant privileges
to that view.
</para>
</para>
<para>
- Fields are compatible with the those in the <acronym>Postgres</acronym>
+ Fields are compatible with those in the <acronym>Postgres</acronym>
implementation, with the following additions:
<variablelist>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/initdb.sgml,v 1.11 2000/05/02 20:02:03 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/initdb.sgml,v 1.12 2000/10/05 19:48:18 momjian Exp $
Postgres documentation
-->
<listitem>
<para>
By default, when <application>initdb</application>
- determines that error prevent it from completely creating the database
+ determines that an error prevented it from completely creating the database
system, it removes any files it may have created before determining
that it can't finish the job. This option inhibits any tidying-up and is
thus useful for debugging.
database. When you create a new database, everything in the
<literal>template1</literal> database is copied.
It contains catalog tables filled in for things like the
- builtin types.
+ built-in types.
</para>
<para>
because you cannot run the database server as root either, but the
server needs to have access to the files <application>initdb</application>
creates. Furthermore, during the initialization phase, when there are no
- users and no access controls installed, postgres will only connect with
+ users and no access controls installed, <productname>Postgres</productname>
+ will only connect with
the name of the current Unix user, so you must log in under the account
that will own the server process.
</para>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/initlocation.sgml,v 1.9 2000/05/26 15:47:17 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/initlocation.sgml,v 1.10 2000/10/05 19:48:18 momjian Exp $
Postgres documentation
-->
</para>
<para>
In order to use this command you must be logged in (using 'su', for example)
- the database superuser.
+ as the database superuser.
</para>
</refsect1>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/insert.sgml,v 1.9 2000/08/25 15:17:50 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/insert.sgml,v 1.10 2000/10/05 19:48:18 momjian Exp $
Postgres documentation
-->
<para>
<command>INSERT</command> allows one to insert new rows into a
class or table. One can insert
- a single row at time or several rows as a result of a query.
+ a single row at a time or several rows as a result of a query.
The columns in the target list may be listed in any order.
</para>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/ipcclean.sgml,v 1.1 1999/07/22 15:09:12 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/ipcclean.sgml,v 1.2 2000/10/05 19:48:18 momjian Exp $
Postgres documentation
-->
is running, the shared memory and semaphores allocated by the
<application>postmaster</application>
will be deleted. This will result in a general failure of the
- backends servers started by that
+ backend servers started by that
<application>postmaster</application>.
</para>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/lock.sgml,v 1.21 2000/07/22 04:30:27 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/lock.sgml,v 1.22 2000/10/05 19:48:18 momjian Exp $
Postgres documentation
-->
<note>
<para>
Automatically acquired by <command>SELECT...FOR UPDATE</command>.
- While it is a shared lock, may be upgrade later to a ROW EXCLUSIVE lock.
+ While it is a shared lock, may be upgraded later to a ROW EXCLUSIVE lock.
</para>
</note>
<note>
<para>
This lock mode is also acquired by an unqualified
- <command>LOCK TABLE</command> (i.e. the command without an explicit
+ <command>LOCK TABLE</command> (i.e., the command without an explicit
lock mode option).
</para>
</note>
for the duration of a transaction.
<productname>Postgres</productname> always uses the least restrictive
lock mode whenever possible. <command>LOCK TABLE</command>
- provided for cases when you might need more restrictive locking.
+ provides for cases when you might need more restrictive locking.
</para>
<para>
<para>
To read data in their real current state when running a transaction
at the SERIALIZABLE isolation level you have to execute a LOCK TABLE
- statement before execution any DML statement, when the transaction defines
+ statement before executing any DML statement, when the transaction defines
what concurrent changes will be visible to itself.
</para>
</note>
<para>
In addition to the requirements above, if a transaction is going to
- change data in a table then SHARE ROW EXCLUSIVE lock mode should
+ change data in a table, then SHARE ROW EXCLUSIVE lock mode should
be acquired to prevent deadlock conditions when two concurrent
transactions attempt to lock the table in SHARE mode and then
try to change data in this table, both (implicitly) acquiring
- ROW EXCLUSIVE lock mode that conflicts with concurrent SHARE lock.
+ ROW EXCLUSIVE lock mode that conflicts with a concurrent SHARE lock.
</para>
<para>
- To continue with the deadlock (when two transaction wait one another)
+ To continue with the deadlock (when two transaction wait for one another)
issue raised above, you should follow two general rules to prevent
deadlock conditions:
</para>
<listitem>
<para>
Transactions should acquire two conflicting lock modes only if
- one of them is self-conflicting (i.e. may be held by one
+ one of them is self-conflicting (i.e., may be held by one
transaction at time only). If multiple lock modes are involved,
then transactions should always acquire the most restrictive mode first.
</para>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/notify.sgml,v 1.12 2000/07/21 04:42:28 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/notify.sgml,v 1.13 2000/10/05 19:48:18 momjian Exp $
Postgres documentation
-->
the notify event will not be delivered to its connected frontend until just
after the transaction is completed (either committed or aborted). Again, the
reasoning is that if a notify were delivered within a transaction that was
- later aborted, one would want the notification to be undone somehow --- but
+ later aborted, one would want the notification to be undone somehow---but
the backend cannot "take back" a notify once it has sent it to the frontend.
So notify events are only delivered between transactions. The upshot of this
is that applications using <command>NOTIFY</command> for real-time signaling
It is common for a frontend that sends <command>NOTIFY</command> to be
listening on the same notify name itself. In that case it will get back a
notify event, just like all the other listening frontends. Depending on the
- application logic, this could result in useless work --- for example,
+ application logic, this could result in useless work---for example,
re-reading a database table to find the same updates that that frontend just
wrote out. In <productname>Postgres</productname> 6.4 and later, it is
possible to avoid such extra work by noticing whether the notifying backend
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/pgctl-ref.sgml,v 1.7 2000/08/29 20:02:09 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_ctl-ref.sgml,v 1.1 2000/10/05 19:48:18 momjian Exp $
Postgres documentation
-->
-<refentry id="app-pgctl">
+<refentry id="app-pg_ctl">
<refmeta>
- <refentrytitle id="app-pgctl-title">
+ <refentrytitle id="app-pg_ctl-title">
<application>pg_ctl</application>
</refentrytitle>
<refmiscinfo>Application</refmiscinfo>
<term>-w</term>
<listitem>
<para>
- Wait for the database server comes up, by
+ Wait for the database server to come up, by
watching for creation of the pid file (PGDATA/postmaster.pid).
Times out after 60 seconds.
</para>
<application>postmaster</application>.
</para>
<para>
- The parameters are usually surrounded by single- or double
+ The parameters are usually surrounded by single or double
quotes to ensure that they are passed through as a group.
</para>
</listitem>
<term>f</term>
<listitem>
<para>
- Fast mode sends SIGTERM to the backends, that means
+ Fast mode sends SIGTERM to the backends; that means
active transactions get rolled back.
</para>
</listitem>
</para>
<para>
- If -w is supplied, pg_ctl waits for the database server comes up, by
+ If -w is supplied, pg_ctl waits for the database server to come up, by
watching for creation of the pid file (PGDATA/postmaster.pid), for up
to 60 seconds.
</para>
<option>-w</option>, <option>-D</option>, <option>-m</option>,
<option>-fast</option>, <option>-immediate</option> and
<option>-o</option>
- can also be used in the restarting mode and they have same meanings as
+ can also be used in the restarting mode and they have the same meanings as
described above.
</para>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.19 2000/07/22 04:45:09 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.20 2000/10/05 19:48:18 momjian Exp $
Postgres documentation
-->
<term>-c</term>
<listitem>
<para>
- Clean(drop) schema prior to create.
+ Clean (drop) schema prior to create.
</para>
</listitem>
</varlistentry>
<term>-v</term>
<listitem>
<para>
- Specifies verbose mode
+ Specifies verbose mode.
</para>
</listitem>
</varlistentry>
Specifies the hostname of the machine on which the
<application>postmaster</application>
is running. Defaults to using a local Unix domain socket
- rather than an IP connection..
+ rather than an IP connection.
</para>
</listitem>
</varlistentry>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.9 2000/07/21 18:51:24 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.10 2000/10/05 19:48:18 momjian Exp $
Postgres documentation
-->
<term>-v</term>
<listitem>
<para>
- Specifies verbose mode
+ Specifies verbose mode.
</para>
</listitem>
</varlistentry>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/pgaccess-ref.sgml,v 1.4 1999/08/06 13:50:30 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/pgaccess-ref.sgml,v 1.5 2000/10/05 19:48:18 momjian Exp $
Postgres documentation
-->
<itemizedlist mark="bullet" spacing="compact">
<listitem>
<para>
- Opens any database on a specified host at the specified port,
+ Open any database on a specified host at the specified port,
username and password.
</para>
</listitem>
<listitem>
<para>
- Saves preferences in <filename>~/.pgaccessrc</filename> file.
+ Save preferences in <filename>~/.pgaccessrc</filename> file.
</para>
</listitem>
</itemizedlist>
<listitem>
<para>
- Execute with optional user input parameters; e.g.
+ Execute with optional user input parameters; e.g.,
<programlisting>
select * from invoices where year=[parameter "Year of selection"]
- </programlisting>
+ </programlisting>.
</para>
</listitem>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/postgres-ref.sgml,v 1.13 2000/07/22 04:45:09 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/postgres-ref.sgml,v 1.14 2000/10/05 19:48:18 momjian Exp $
Postgres documentation
-->
<para>
Indicates to the backend server that it has been started by a
<application>postmaster</application>
- and make different assumptions about buffer pool management, file
+ and makes different assumptions about buffer pool management, file
descriptors, etc. Switches following -p are restricted to those
considered "secure".
</para>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/postmaster.sgml,v 1.11 2000/07/21 14:51:00 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/postmaster.sgml,v 1.12 2000/10/05 19:48:18 momjian Exp $
Postgres documentation
-->
environment variable, or if <envar>PGPORT</envar>
is not set, then defaults to the value established when Postgres was
compiled (normally 5432). If you specify a port other than the
- default port then all frontend applications (including
+ default port, then all frontend applications (including
<application>psql</application>) must specify the same
port using either command-line options or
<envar>PGPORT</envar>.
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.37 2000/09/27 11:56:16 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.38 2000/10/05 19:48:18 momjian Exp $
Postgres documentation
-->
If an argument is found that does not belong to any option it will be interpreted
as the database name (or the user name, if the database name is also
given). Not all these options are required, defaults do apply.
- If you omit the host name psql will connect via a UNIX domain socket
+ If you omit the host name psql will connect via a Unix domain socket
to a server on the
local host. The default port number is compile-time determined. Since the database
server uses the same default, you will not have to specify the port in most
<para>
The format of a <application>psql</application> command is the backslash,
followed immediately by a command verb, then any arguments. The arguments
- are separated from the command verb and each other by any number of white
- space characters.
+ are separated from the command verb and each other by any number of
+ whitespace characters.
</para>
<para>
</para>
<para>
- If the connection attempt failed (wrong username, access denied, etc.) the
+ If the connection attempt failed (wrong username, access denied, etc.), the
previous connection will be kept if and only if <application>psql</application> is
in interactive mode. When executing a non-interactive script, processing
will immediately stop with an error. This distinction was chosen as a user
If <replaceable class="parameter">pattern</replaceable>
(a regular expression) is specified, only matching functions are shown.
If the form <literal>\df+</literal> is used, additional information about
- each function, including language and description is shown.
+ each function, including language and description, is shown.
</para>
</listitem>
</varlistentry>
<para>
If <replaceable class="parameter">pattern</replaceable> is specified,
- it is a regular expression restricts the listing to those objects
+ it is a regular expression that restricts the listing to those objects
whose name matches. If one appends a <quote>+</quote> to the command name,
each object is listed with its associated description, if any.
</para>
<listitem>
<para>
Saves future query results to the file
- <replaceable class="parameter">filename</replaceable> or pipe future
+ <replaceable class="parameter">filename</replaceable> or pipes future
results into a separate Unix shell to execute
<replaceable class="parameter">command</replaceable>.
If no arguments are specified, the query output will be reset to
<term><literal>\?</literal></term>
<listitem>
<para>
- Get help information about the slash (<quote>\</quote>) commands.
+ Get help information about the backslash (<quote>\</quote>) commands.
</para>
</listitem>
</varlistentry>
Use the file <replaceable class="parameter">filename</replaceable>
as the source of queries instead of reading queries interactively.
After the file is processed, <application>psql</application> terminates.
- This in many ways equivalent to the internal command <command>\i</command>.
+ This is in many ways equivalent to the internal command <command>\i</command>.
</para>
<para>
Using this option is subtly different from writing
documentation of the large object interface for more information.) Since
<application>psql</application> has no way to tell if you already
have a transaction in progress when you call one of its internal
- commands <command>\lo_export</command>, <command>\lo_import</command>,
- <command>\lo_unlink</command> it must take some arbitrary action. This
+ commands (<command>\lo_export</command>, <command>\lo_import</command>,
+ <command>\lo_unlink</command>) it must take some arbitrary action. This
action could either be to roll back any transaction that might already
be in progress, or to commit any such transaction, or to do nothing at
all. In the last case you must provide your own
<para>
A popular application of this facility is to refer to the last inserted
- <acronym>OID</acronym> in subsequent statement to build a foreign key
+ <acronym>OID</acronym> in subsequent statements to build a foreign key
scenario.
Another possible use of this mechanism is to copy the contents of a file
into a field. First load the file into a variable and then proceed as above.
<term><literal>%</literal><replaceable class="parameter">digits</replaceable></term>
<listitem><para>
If <replaceable class="parameter">digits</replaceable> starts with
- <literal>0x</literal> the rest of the characters are interpreted at a
+ <literal>0x</literal> the rest of the characters are interpreted as a
hexadecimal digit and the character with the corresponding code is
substituted. If the first digit is <literal>0</literal> the characters are
interpreted as on octal number and the corresponding character is
(4 rows)
</programlisting>
- Notice how the int4 columns in right aligned while the text column in left aligned.
You can make this table look differently by using the <command>\pset</command>
command:
<programlisting>
if you get strange messages, keep this in mind. For example
<programlisting>
testdb=> <userinput>\foo</userinput>
-Field separator is "oo".
+Field separator is "oo",
</programlisting>
- is perhaps not what one would expect.
+ which is perhaps not what one would expect.
</para>
</listitem>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/reindex.sgml,v 1.2 2000/07/22 04:45:10 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/reindex.sgml,v 1.3 2000/10/05 19:48:18 momjian Exp $
Postgres documentation
-->
</title>
<para>
<command>REINDEX</command> is used to recover corrupted system indexes.
- In order to run REINDEX command,Postmaster must be shutdown and
+ In order to run REINDEX command, postmaster must be shut down and
stand-alone Postgres should be started instead with options -O and
- -P(an option to ignore system indexes). Note that we couldn't rely
+ -P (an option to ignore system indexes). Note that we couldn't rely
on system indexes for the recovery of system indexes.
</para>
</refsect1>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/revoke.sgml,v 1.10 2000/04/10 01:35:44 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/revoke.sgml,v 1.11 2000/10/05 19:48:18 momjian Exp $
Postgres documentation
-->
<para>
If user1 gives a privilege WITH GRANT OPTION to user2,
- and user2 gives it to user3 then if user1 try revoke
- this privilege it fails if he/she specify the RESTRICT
+ and user2 gives it to user3, then if user1 tries revoke
+ this privilege it fails if he specify the RESTRICT
keyword.
</para>
</refsect2>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/select.sgml,v 1.32 2000/07/22 04:30:27 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/select.sgml,v 1.33 2000/10/05 19:48:18 momjian Exp $
Postgres documentation
-->
where <replaceable class="PARAMETER">cond_op</replaceable>
can be one of: =, <, <=, >, >= or <>,
a conditional operator like ALL, ANY, IN, LIKE, or a
- locally-defined operator,
+ locally defined operator,
and <replaceable class="PARAMETER">log_op</replaceable> can be one
of: AND, OR, NOT.
SELECT will ignore all rows for which the WHERE condition does not return
<para>
When using LIMIT, it is a good idea to use an ORDER BY clause that
constrains the result rows into a unique order. Otherwise you will get
- an unpredictable subset of the query's rows --- you may be asking for
+ an unpredictable subset of the query's rows---you may be asking for
the tenth through twentieth rows, but tenth through twentieth in what
ordering? You don't know what ordering, unless you specified ORDER BY.
</para>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/set.sgml,v 1.49 2000/09/12 21:12:45 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/set.sgml,v 1.50 2000/10/05 19:48:19 momjian Exp $
Postgres documentation
-->
<term>TIMEZONE</term>
<listitem>
<para>
- The possible values for timezone depends on your operating
+ The possible values for time zone depends on your operating
system. For example, on Linux
<filename>/usr/share/zoneinfo</filename> contains the database
of time zones.
</para>
<para>
- Here are some valid values for timezone:
+ Here are some valid values for time zone:
<variablelist>
<varlistentry>
SET DATESTYLE TO Postgres,European;
</screen>
- Set the timezone for Berkeley, California, using double quotes to
+ Set the time zone for Berkeley, California, using double quotes to
preserve the uppercase attributes of the time zone specifier (note
that the date/time format is ISO here):
1998-03-31 07:41:21-08
</screen>
- Set the timezone for Italy (note the required single or double quotes to handle
+ Set the time zone for Italy (note the required single or double quotes to handle
the special characters):
<screen>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/unlisten.sgml,v 1.11 2000/07/21 04:49:23 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/unlisten.sgml,v 1.12 2000/10/05 19:48:19 momjian Exp $
Postgres documentation
-->
</computeroutput></term>
<listitem>
<para>
- Acknowledgement that statement has executed.
+ Acknowledgment that statement has executed.
</para>
</listitem>
</varlistentry>
</title>
<para>
<replaceable class="PARAMETER">classname</replaceable>
- needs not to be a valid class name but can be any string valid
+ need not be a valid class name but can be any string valid
as a name up to 32 characters long.
</para>
<para>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuum.sgml,v 1.10 2000/09/12 21:12:45 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuum.sgml,v 1.11 2000/10/05 19:48:19 momjian Exp $
Postgres documentation
-->
<para>
<command>VACUUM ANALYZE</command> collects statistics representing the
- disbursion of the data in each column.
+ dispersion of the data in each column.
This information is valuable when several query execution paths are possible.
</para>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.60 2000/09/29 20:21:34 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.61 2000/10/05 19:48:16 momjian Exp $
-->
<chapter id="release">
Remove call to difftime() in timestamp support to fix SunOS(Bruce & Thomas)
Changes for Digital Unix
Portability fix for pg_dumpall(Bruce)
-Rename pg_attribute.attnvals to attdisbursion(Bruce)
+Rename pg_attribute.attnvals to attdispersion(Bruce)
"intro/unix" manual page now "pgintro"(Bruce)
"built-in" manual page now "pgbuiltin"(Bruce)
"drop" manual page now "drop_table"(Bruce)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.66 2000/07/03 23:09:10 wieck Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.67 2000/10/05 19:48:20 momjian Exp $
*
* NOTES
* some of the executor utility code such as "ExecTypeFromTL" should be
/*
* We do not need to check every single field here, and in fact
- * some fields such as attdisbursion probably shouldn't be
+ * some fields such as attdispersion probably shouldn't be
* compared.
*/
if (strcmp(NameStr(attr1->attname), NameStr(attr2->attname)) != 0)
MemSet(NameStr(att->attname), 0, NAMEDATALEN);
- att->attdisbursion = 0; /* dummy value */
+ att->attdispersion = 0; /* dummy value */
att->attcacheoff = -1;
att->atttypmod = typmod;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.146 2000/09/30 18:28:53 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.147 2000/10/05 19:48:21 momjian Exp $
*
*
* INTERFACE ROUTINES
* work? Is it automatic now? Expects the caller to have
* attname, atttypid, atttyparg, attproc, and attlen domains filled.
* Create fills the attnum domains sequentually from zero,
- * fills the attdisbursion domains with zeros, and fills the
+ * fills the attdispersion domains with zeros, and fills the
* attrelid fields with the relid.
*
* scan relation catalog for name conflict
for (i = 0; i < natts; i++)
{
(*dpp)->attrelid = new_rel_oid;
- (*dpp)->attdisbursion = 0;
+ (*dpp)->attdispersion = 0;
tup = heap_addheader(Natts_pg_attribute,
ATTRIBUTE_TUPLE_SIZE,
for (i = 0; i < -1 - FirstLowInvalidHeapAttributeNumber; i++)
{
(*dpp)->attrelid = new_rel_oid;
- /* (*dpp)->attdisbursion = 0; unneeded */
+ /* (*dpp)->attdispersion = 0; unneeded */
tup = heap_addheader(Natts_pg_attribute,
ATTRIBUTE_TUPLE_SIZE,
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.126 2000/07/14 22:17:41 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.127 2000/10/05 19:48:21 momjian Exp $
*
*
* INTERFACE ROUTINES
*/
((Form_pg_attribute) to)->attnum = i + 1;
- ((Form_pg_attribute) to)->attdisbursion = 0.0;
+ ((Form_pg_attribute) to)->attdispersion = 0.0;
((Form_pg_attribute) to)->attnotnull = false;
((Form_pg_attribute) to)->atthasdef = false;
((Form_pg_attribute) to)->attcacheoff = -1;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.6 2000/09/06 14:15:16 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.7 2000/10/05 19:48:22 momjian Exp $
*
*-------------------------------------------------------------------------
float4 selratio; /* average ratio of rows selected
* for a random constant */
- /* Compute disbursion */
+ /* Compute dispersion */
if (stats->nonnull_cnt == 0 && stats->null_cnt == 0)
{
/*
* empty relation, so put a dummy value in
- * attdisbursion
+ * attdispersion
*/
selratio = 0;
}
* looks like we have a unique-key attribute --- flag
* this with special -1.0 flag value.
*
- * The correct disbursion is 1.0/numberOfRows, but since
+ * The correct dispersion is 1.0/numberOfRows, but since
* the relation row count can get updated without
- * recomputing disbursion, we want to store a
+ * recomputing dispersion, we want to store a
* "symbolic" value and figure 1.0/numberOfRows on the
* fly.
*/
}
/* overwrite the existing statistics in the tuple */
- attp->attdisbursion = selratio;
+ attp->attdispersion = selratio;
/* invalidate the tuple in the cache and write the buffer */
RelationInvalidateHeapTuple(ad, atup);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.104 2000/09/29 18:21:26 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.105 2000/10/05 19:48:22 momjian Exp $
*
* NOTES
* The PerformAddAttribute() code, like most of the relation
namestrcpy(&(attribute->attname), colDef->colname);
attribute->atttypid = typeTuple->t_data->t_oid;
attribute->attlen = tform->typlen;
- attribute->attdisbursion = 0;
+ attribute->attdispersion = 0;
attribute->attcacheoff = -1;
attribute->atttypmod = colDef->typename->typmod;
attribute->attnum = i;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.166 2000/09/19 19:30:03 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.167 2000/10/05 19:48:22 momjian Exp $
*
*-------------------------------------------------------------------------
*
* Statistics are stored in several places: the pg_class row for the
* relation has stats about the whole relation, the pg_attribute rows
- * for each attribute store "disbursion", and there is a pg_statistic
- * row for each (non-system) attribute. (Disbursion probably ought to
+ * for each attribute store "dispersion", and there is a pg_statistic
+ * row for each (non-system) attribute. (Dispersion probably ought to
* be moved to pg_statistic, but it's not worth doing unless there's
- * another reason to have to change pg_attribute.) Disbursion and
+ * another reason to have to change pg_attribute.) Dispersion and
* pg_statistic values are only updated by VACUUM ANALYZE, but we
* always update the stats in pg_class.
*
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.66 2000/09/12 21:06:48 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.67 2000/10/05 19:48:25 momjian Exp $
*
*-------------------------------------------------------------------------
*/
att->atttypid = typeID;
att->attdefrel = 0; /* dummy value */
- att->attdisbursion = 0; /* dummy value */
+ att->attdispersion = 0; /* dummy value */
att->atttyparg = 0; /* dummy value */
att->attlen = attLen;
att->attnum = attNum;
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.63 2000/09/29 18:21:32 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.64 2000/10/05 19:48:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* 'outer_path' is the path for the outer relation
* 'inner_path' is the path for the inner relation
* 'restrictlist' are the RestrictInfo nodes to be applied at the join
- * 'innerdisbursion' is an estimate of the disbursion statistic
+ * 'innerdispersion' is an estimate of the dispersion statistic
* for the inner hash key.
*/
void
Path *outer_path,
Path *inner_path,
List *restrictlist,
- Selectivity innerdisbursion)
+ Selectivity innerdispersion)
{
Cost startup_cost = 0;
Cost run_cost = 0;
* average bucket loading of NTUP_PER_BUCKET, but that goal will
* be reached only if data values are uniformly distributed among
* the buckets. To be conservative, we scale up the target bucket
- * size by the number of inner rows times inner disbursion, giving
+ * size by the number of inner rows times inner dispersion, giving
* an estimate of the typical number of duplicates of each value.
* We then charge one cpu_operator_cost per tuple comparison.
*/
run_cost += cpu_operator_cost * outer_path->parent->rows *
- NTUP_PER_BUCKET * ceil(inner_path->parent->rows * innerdisbursion);
+ NTUP_PER_BUCKET * ceil(inner_path->parent->rows * innerdispersion);
/*
* Estimate the number of tuples that get through the hashing filter
/*
* Bias against putting larger relation on inside. We don't want an
* absolute prohibition, though, since larger relation might have
- * better disbursion --- and we can't trust the size estimates
+ * better dispersion --- and we can't trust the size estimates
* unreservedly, anyway. Instead, inflate the startup cost by the
* square root of the size ratio. (Why square root? No real good
* reason, but it seems reasonable...)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.57 2000/09/29 18:21:32 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.58 2000/10/05 19:48:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
List *restrictlist, JoinType jointype);
static Path *best_innerjoin(List *join_paths, List *outer_relid,
JoinType jointype);
-static Selectivity estimate_disbursion(Query *root, Var *var);
+static Selectivity estimate_dispersion(Query *root, Var *var);
static List *select_mergejoin_clauses(RelOptInfo *joinrel,
RelOptInfo *outerrel,
RelOptInfo *innerrel,
*right,
*inner;
List *hashclauses;
- Selectivity innerdisbursion;
+ Selectivity innerdispersion;
if (restrictinfo->hashjoinoperator == InvalidOid)
continue; /* not hashjoinable */
/* always a one-element list of hash clauses */
hashclauses = makeList1(restrictinfo);
- /* estimate disbursion of inner var for costing purposes */
- innerdisbursion = estimate_disbursion(root, inner);
+ /* estimate dispersion of inner var for costing purposes */
+ innerdispersion = estimate_dispersion(root, inner);
/*
* We consider both the cheapest-total-cost and
innerrel->cheapest_total_path,
restrictlist,
hashclauses,
- innerdisbursion));
+ innerdispersion));
if (outerrel->cheapest_startup_path != outerrel->cheapest_total_path)
add_path(joinrel, (Path *)
create_hashjoin_path(joinrel,
innerrel->cheapest_total_path,
restrictlist,
hashclauses,
- innerdisbursion));
+ innerdispersion));
}
}
}
/*
- * Estimate disbursion of the specified Var
+ * Estimate dispersion of the specified Var
*
* We use a default of 0.1 if we can't figure out anything better.
* This will typically discourage use of a hash rather strongly,
* seem much worse).
*/
static Selectivity
-estimate_disbursion(Query *root, Var *var)
+estimate_dispersion(Query *root, Var *var)
{
Oid relid;
if (relid == InvalidOid)
return 0.1;
- return (Selectivity) get_attdisbursion(relid, var->varattno, 0.1);
+ return (Selectivity) get_attdispersion(relid, var->varattno, 0.1);
}
/*
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.66 2000/09/29 18:21:23 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.67 2000/10/05 19:48:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* 'restrict_clauses' are the RestrictInfo nodes to apply at the join
* 'hashclauses' is a list of the hash join clause (always a 1-element list)
* (this should be a subset of the restrict_clauses list)
- * 'innerdisbursion' is an estimate of the disbursion of the inner hash key
+ * 'innerdispersion' is an estimate of the dispersion of the inner hash key
*
*/
HashPath *
Path *inner_path,
List *restrict_clauses,
List *hashclauses,
- Selectivity innerdisbursion)
+ Selectivity innerdispersion)
{
HashPath *pathnode = makeNode(HashPath);
outer_path,
inner_path,
restrict_clauses,
- innerdisbursion);
+ innerdispersion);
return pathnode;
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.79 2000/09/15 18:45:26 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.80 2000/10/05 19:48:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
/*
* No VACUUM ANALYZE stats available, so make a guess using
- * the disbursion stat (if we have that, which is unlikely for
+ * the dispersion stat (if we have that, which is unlikely for
* a normal attribute; but for a system attribute we may be
* able to estimate it).
*/
- selec = get_attdisbursion(relid, attno, 0.01);
+ selec = get_attdispersion(relid, attno, 0.01);
}
result = (float8) selec;
result = DEFAULT_EQ_SEL;
else
{
- num1 = unknown1 ? 1.0 : get_attdisbursion(relid1, attno1, 0.01);
- num2 = unknown2 ? 1.0 : get_attdisbursion(relid2, attno2, 0.01);
+ num1 = unknown1 ? 1.0 : get_attdispersion(relid1, attno1, 0.01);
+ num2 = unknown2 ? 1.0 : get_attdispersion(relid2, attno2, 0.01);
/*
* The join selectivity cannot be more than num2, since each tuple
* reasoning it is not more than num1. The min is therefore an
* upper bound.
*
- * If we know the disbursion of only one side, use it; the reasoning
+ * If we know the dispersion of only one side, use it; the reasoning
* above still works.
*
* XXX can we make a better estimate here? Using the nullfrac
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.45 2000/08/13 02:50:16 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.46 2000/10/05 19:48:29 momjian Exp $
*
* NOTES
* Eventually, the index information should go through here, too.
}
/*
- * get_attdisbursion
+ * get_attdispersion
*
- * Retrieve the disbursion statistic for an attribute,
+ * Retrieve the dispersion statistic for an attribute,
* or produce an estimate if no info is available.
*
* min_estimate is the minimum estimate to return if insufficient data
* estimating the number of tuples produced by an equijoin.)
*/
double
-get_attdisbursion(Oid relid, AttrNumber attnum, double min_estimate)
+get_attdispersion(Oid relid, AttrNumber attnum, double min_estimate)
{
HeapTuple atp;
Form_pg_attribute att_tup;
- double disbursion;
+ double dispersion;
int32 ntuples;
atp = SearchSysCacheTuple(ATTNUM,
if (!HeapTupleIsValid(atp))
{
/* this should not happen */
- elog(ERROR, "get_attdisbursion: no attribute tuple %u %d",
+ elog(ERROR, "get_attdispersion: no attribute tuple %u %d",
relid, attnum);
return min_estimate;
}
att_tup = (Form_pg_attribute) GETSTRUCT(atp);
- disbursion = att_tup->attdisbursion;
- if (disbursion > 0.0)
- return disbursion; /* we have a specific estimate from VACUUM */
+ dispersion = att_tup->attdispersion;
+ if (dispersion > 0.0)
+ return dispersion; /* we have a specific estimate from VACUUM */
/*
- * Special-case boolean columns: the disbursion of a boolean is highly
+ * Special-case boolean columns: the dispersion of a boolean is highly
* unlikely to be anywhere near 1/numtuples, instead it's probably
* more like 0.5.
*
return 0.5;
/*
- * Disbursion is either 0 (no data available) or -1 (disbursion is
+ * Dispersion is either 0 (no data available) or -1 (dispersion is
* 1/numtuples). Either way, we need the relation size.
*/
if (!HeapTupleIsValid(atp))
{
/* this should not happen */
- elog(ERROR, "get_attdisbursion: no relation tuple %u", relid);
+ elog(ERROR, "get_attdispersion: no relation tuple %u", relid);
return min_estimate;
}
if (ntuples == 0)
return min_estimate; /* no data available */
- if (disbursion < 0.0) /* VACUUM thinks there are no duplicates */
+ if (dispersion < 0.0) /* VACUUM thinks there are no duplicates */
return 1.0 / (double) ntuples;
/*
- * VACUUM ANALYZE does not compute disbursion for system attributes,
+ * VACUUM ANALYZE does not compute dispersion for system attributes,
* but some of them can reasonably be assumed unique anyway.
*/
if (attnum == ObjectIdAttributeNumber ||
* = 1/numtuples. This may produce unreasonably small estimates for
* large tables, so limit the estimate to no less than min_estimate.
*/
- disbursion = 1.0 / (double) ntuples;
- if (disbursion < min_estimate)
- disbursion = min_estimate;
+ dispersion = 1.0 / (double) ntuples;
+ if (dispersion < min_estimate)
+ dispersion = min_estimate;
- return disbursion;
+ return dispersion;
}
/* ---------- INDEX CACHE ---------- */
Prints a detailed vacuum activity report for each table.
" {} "ANALYZE" {italic} "
- Updates column statistics used by the optimizer to determine the most efficient way to execute a query. The statistics represent the disbursion of the data in each column. This information is valuable when several execution paths are possible.
+ Updates column statistics used by the optimizer to determine the most efficient way to execute a query. The statistics represent the dispersion of the data in each column. This information is valuable when several execution paths are possible.
" {} "table" {italic} "
The name of a specific table to vacuum. Defaults to all tables.
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_attribute.h,v 1.63 2000/08/06 04:39:33 tgl Exp $
+ * $Id: pg_attribute.h,v 1.64 2000/10/05 19:48:31 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
* Postgres will fail.
*/
- float4 attdisbursion;
+ float4 attdispersion;
/*
- * attdisbursion is the disbursion statistic of the column (0.0 to
+ * attdispersion is the dispersion statistic of the column (0.0 to
* 1.0), or zero if the statistic has not been calculated, or -1.0 if
* VACUUM found that the column contains no duplicate entries (in
- * which case the disbursion should be taken as 1.0/numberOfRows for
+ * which case the dispersion should be taken as 1.0/numberOfRows for
* the current table size). The -1.0 hack is useful because the
- * number of rows may be updated more often than attdisbursion is. We
+ * number of rows may be updated more often than attdispersion is. We
* assume that the column will retain its no-duplicate-entry property.
* (Perhaps this should be driven off the existence of a UNIQUE index
* for the column, instead of being a statistical guess?)
#define Anum_pg_attribute_attrelid 1
#define Anum_pg_attribute_attname 2
#define Anum_pg_attribute_atttypid 3
-#define Anum_pg_attribute_attdisbursion 4
+#define Anum_pg_attribute_attdispersion 4
#define Anum_pg_attribute_attlen 5
#define Anum_pg_attribute_attnum 6
#define Anum_pg_attribute_attnelems 7
{ 1249, {"attrelid"}, 26, 0, 4, 1, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
{ 1249, {"attname"}, 19, 0, NAMEDATALEN, 2, 0, -1, -1, '\0', 'p', '\0', 'i', '\0', '\0' }, \
{ 1249, {"atttypid"}, 26, 0, 4, 3, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
-{ 1249, {"attdisbursion"}, 700, 0, 4, 4, 0, -1, -1, '\0', 'p', '\0', 'i', '\0', '\0' }, \
+{ 1249, {"attdispersion"}, 700, 0, 4, 4, 0, -1, -1, '\0', 'p', '\0', 'i', '\0', '\0' }, \
{ 1249, {"attlen"}, 21, 0, 2, 5, 0, -1, -1, '\001', 'p', '\0', 's', '\0', '\0' }, \
{ 1249, {"attnum"}, 21, 0, 2, 6, 0, -1, -1, '\001', 'p', '\0', 's', '\0', '\0' }, \
{ 1249, {"attnelems"}, 23, 0, 4, 7, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
DATA(insert OID = 0 ( 1249 attrelid 26 0 4 1 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1249 attname 19 0 NAMEDATALEN 2 0 -1 -1 f p f i f f));
DATA(insert OID = 0 ( 1249 atttypid 26 0 4 3 0 -1 -1 t p f i f f));
-DATA(insert OID = 0 ( 1249 attdisbursion 700 0 4 4 0 -1 -1 f p f i f f));
+DATA(insert OID = 0 ( 1249 attdispersion 700 0 4 4 0 -1 -1 f p f i f f));
DATA(insert OID = 0 ( 1249 attlen 21 0 2 5 0 -1 -1 t p f s f f));
DATA(insert OID = 0 ( 1249 attnum 21 0 2 6 0 -1 -1 t p f s f f));
DATA(insert OID = 0 ( 1249 attnelems 23 0 4 7 0 -1 -1 t p f i f f));
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: cost.h,v 1.34 2000/06/08 22:37:51 momjian Exp $
+ * $Id: cost.h,v 1.35 2000/10/05 19:48:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
List *restrictlist,
List *outersortkeys, List *innersortkeys);
extern void cost_hashjoin(Path *path, Path *outer_path, Path *inner_path,
- List *restrictlist, Selectivity innerdisbursion);
+ List *restrictlist, Selectivity innerdispersion);
extern Cost cost_qual_eval(List *quals);
extern void set_baserel_size_estimates(Query *root, RelOptInfo *rel);
extern void set_joinrel_size_estimates(Query *root, RelOptInfo *rel,
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: pathnode.h,v 1.29 2000/09/29 18:21:40 tgl Exp $
+ * $Id: pathnode.h,v 1.30 2000/10/05 19:48:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
Path *inner_path,
List *restrict_clauses,
List *hashclauses,
- Selectivity innerdisbursion);
+ Selectivity innerdispersion);
/*
* prototypes for relnode.c
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: lsyscache.h,v 1.25 2000/08/13 02:50:31 tgl Exp $
+ * $Id: lsyscache.h,v 1.26 2000/10/05 19:48:34 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern Oid get_atttype(Oid relid, AttrNumber attnum);
extern bool get_attisset(Oid relid, char *attname);
extern int32 get_atttypmod(Oid relid, AttrNumber attnum);
-extern double get_attdisbursion(Oid relid, AttrNumber attnum,
+extern double get_attdispersion(Oid relid, AttrNumber attnum,
double min_estimate);
extern RegProcedure get_opcode(Oid opno);
extern char *get_opname(Oid opno);