index 73ad8a057e29d6d2f518f96fadada39cf969f0ae..090a64c9a8ffae60f1c2b16ed7310955ad5d9353 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/arch-dev.sgml,v 2.22 2003年09月29日 18:18:35 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/arch-dev.sgml,v 2.23 2003年11月01日 01:56:28 petere Exp $
-->
<chapter id="overview">
@@ -99,11 +99,11 @@ $Header: /cvsroot/pgsql/doc/src/sgml/arch-dev.sgml,v 2.22 2003年09月29日 18:18:35 mo
<para>
The executor recursively steps through
the <firstterm>plan tree</firstterm> and
- retrieves tuples in the way represented by the plan.
+ retrieves rows in the way represented by the plan.
The executor makes use of the
<firstterm>storage system</firstterm> while scanning
relations, performs <firstterm>sorts</firstterm> and <firstterm>joins</firstterm>,
- evaluates <firstterm>qualifications</firstterm> and finally hands back the tuples derived.
+ evaluates <firstterm>qualifications</firstterm> and finally hands back the rows derived.
</para>
</step>
</procedure>
@@ -150,7 +150,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/arch-dev.sgml,v 2.22 2003年09月29日 18:18:35 mo
to the <firstterm>backend</firstterm> (server). The query is transmitted using plain text,
i.e. there is no parsing done in the <firstterm>frontend</firstterm> (client). The
server parses the query, creates an <firstterm>execution plan</firstterm>,
- executes the plan and returns the retrieved tuples to the client
+ executes the plan and returns the retrieved rows to the client
by transmitting them over the established connection.
</para>
</sect1>
@@ -195,8 +195,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/arch-dev.sgml,v 2.22 2003年09月29日 18:18:35 mo
The <firstterm>lexer</firstterm> is defined in the file
<filename>scan.l</filename> and is responsible
for recognizing <firstterm>identifiers</firstterm>,
- the <firstterm>SQL keywords</firstterm> etc. For
- every keyword or identifier that is found, a <firstterm>token</firstterm>
+ the <firstterm>SQL keywords</firstterm> etc. For
+ every keyword or identifier that is found, a <firstterm>token</firstterm>
is generated and handed to the parser.
</para>
@@ -278,7 +278,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/arch-dev.sgml,v 2.22 2003年09月29日 18:18:35 mo
call. This may be transformed to either a <structname>FuncExpr</>
or <structname>Aggref</> node depending on whether the referenced
name turns out to be an ordinary function or an aggregate function.
- Also, information about the actual datatypes of columns and expression
+ Also, information about the actual datatypes of columns and expression
results is added to the query tree.
</para>
</sect2>
@@ -297,9 +297,9 @@ $Header: /cvsroot/pgsql/doc/src/sgml/arch-dev.sgml,v 2.22 2003年09月29日 18:18:35 mo
<itemizedlist>
<listitem>
<para>
- The first one worked using <firstterm>tuple level</firstterm> processing and was
+ The first one worked using <firstterm>row level</firstterm> processing and was
implemented deep in the <firstterm>executor</firstterm>. The rule system was
- called whenever an individual tuple had been accessed. This
+ called whenever an individual row had been accessed. This
implementation was removed in 1995 when the last official release
of the <productname>Berkeley Postgres</productname> project was
transformed into <productname>Postgres95</productname>.
@@ -396,11 +396,11 @@ $Header: /cvsroot/pgsql/doc/src/sgml/arch-dev.sgml,v 2.22 2003年09月29日 18:18:35 mo
<listitem>
<para>
<firstterm>nested loop join</firstterm>: The right relation is scanned
- once for every tuple found in the left relation. This strategy
+ once for every row found in the left relation. This strategy
is easy to implement but can be very time consuming. (However,
- if the right relation can be scanned with an indexscan, this can
+ if the right relation can be scanned with an indexscan, this can
be a good strategy. It is possible to use values from the current
- row of the left relation as keys for the indexscan of the right.)
+ row of the left relation as keys for the indexscan of the right.)
</para>
</listitem>
@@ -419,8 +419,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/arch-dev.sgml,v 2.22 2003年09月29日 18:18:35 mo
<firstterm>hash join</firstterm>: the right relation is first scanned
and loaded into a hash table, using its join attributes as hash keys.
Next the left relation is scanned and the
- appropriate values of every tuple found are used as hash keys to
- locate the matching tuples in the table.
+ appropriate values of every row found are used as hash keys to
+ locate the matching rows in the table.
</para>
</listitem>
</itemizedlist>
@@ -428,7 +428,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/arch-dev.sgml,v 2.22 2003年09月29日 18:18:35 mo
<para>
The finished plan tree consists of sequential or index scans of
- the base relations, plus nestloop, merge, or hash join nodes as
+ the base relations, plus nested-loop, merge, or hash join nodes as
needed, plus any auxiliary steps needed, such as sort nodes or
aggregate-function calculation nodes. Most of these plan node
types have the additional ability to do <firstterm>selection</>
@@ -451,26 +451,26 @@ $Header: /cvsroot/pgsql/doc/src/sgml/arch-dev.sgml,v 2.22 2003年09月29日 18:18:35 mo
The <firstterm>executor</firstterm> takes the plan handed back by the
planner/optimizer and recursively processes it to extract the required set
of rows. This is essentially a demand-pull pipeline mechanism.
- Each time a plan node is called, it must deliver one more tuple, or
- report that it is done delivering tuples.
+ Each time a plan node is called, it must deliver one more row, or
+ report that it is done delivering rows.
</para>
<para>
To provide a concrete example, assume that the top
node is a <literal>MergeJoin</literal> node.
- Before any merge can be done two tuples have to be fetched (one from
+ Before any merge can be done two rows have to be fetched (one from
each subplan). So the executor recursively calls itself to
process the subplans (it starts with the subplan attached to
<literal>lefttree</literal>). The new top node (the top node of the left
subplan) is, let's say, a
<literal>Sort</literal> node and again recursion is needed to obtain
- an input tuple. The child node of the <literal>Sort</literal> might
+ an input row. The child node of the <literal>Sort</literal> might
be a <literal>SeqScan</> node, representing actual reading of a table.
Execution of this node causes the executor to fetch a row from the
table and return it up to the calling node. The <literal>Sort</literal>
node will repeatedly call its child to obtain all the rows to be sorted.
When the input is exhausted (as indicated by the child node returning
- a NULL instead of a tuple), the <literal>Sort</literal> code performs
+ a NULL instead of a row), the <literal>Sort</literal> code performs
the sort, and finally is able to return its first output row, namely
the first one in sorted order. It keeps the remaining rows stored so
that it can deliver them in sorted order in response to later demands.
@@ -508,7 +508,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/arch-dev.sgml,v 2.22 2003年09月29日 18:18:35 mo
result row. But <command>INSERT ... SELECT</> may demand the full power
of the executor mechanism.) For <command>UPDATE</>, the planner arranges
that each computed row includes all the updated column values, plus
- the <firstterm>TID</> (tuple ID, or location) of the original target row;
+ the <firstterm>TID</> (tuple ID, or row ID) of the original target row;
the executor top level uses this information to create a new updated row
and mark the old row deleted. For <command>DELETE</>, the only column
that is actually returned by the plan is the TID, and the executor top
index 68c6dc40db0f8b2c9eefced6414755f007f14685..fc87fdf43f03ff8f9783f6515b42255c24929dc8 100644 (file)
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/array.sgml,v 1.31 2003年08月31日 17:32:18 petere Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/array.sgml,v 1.32 2003年11月01日 01:56:28 petere Exp $ -->
<sect1 id="arrays">
<title>Arrays</title>
@@ -348,9 +348,9 @@ SELECT ARRAY[5,6] || ARRAY[[1,2],[3,4]];
<para>
When a single element is pushed on to the beginning of a one-dimensional
array, the result is an array with a lower bound subscript equal to
- the righthand operand's lower bound subscript, minus one. When a single
+ the right-hand operand's lower bound subscript, minus one. When a single
element is pushed on to the end of a one-dimensional array, the result is
- an array retaining the lower bound of the lefthand operand. For example:
+ an array retaining the lower bound of the left-hand operand. For example:
<programlisting>
SELECT array_dims(1 || ARRAY[2,3]);
array_dims
<para>
When two arrays with an equal number of dimensions are concatenated, the
- result retains the lower bound subscript of the lefthand operand's outer
- dimension. The result is an array comprising every element of the lefthand
- operand followed by every element of the righthand operand. For example:
+ result retains the lower bound subscript of the left-hand operand's outer
+ dimension. The result is an array comprising every element of the left-hand
+ operand followed by every element of the right-hand operand. For example:
<programlisting>
SELECT array_dims(ARRAY[1,2] || ARRAY[3,4,5]);
array_dims
index a30f0f867b2bdf4a703073a6be5ef3962d2992e3..a93b0587cf2fec634bb2357299dcad37501c4e19 100644 (file)
<!--
Documentation of the system catalogs, directed toward PostgreSQL developers
- $Header: /cvsroot/pgsql/doc/src/sgml/catalogs.sgml,v 2.76 2003年10月17日 22:38:20 tgl Exp $
+ $Header: /cvsroot/pgsql/doc/src/sgml/catalogs.sgml,v 2.77 2003年11月01日 01:56:28 petere Exp $
-->
<chapter id="catalogs">
<entry><type>int4</type></entry>
<entry></entry>
<entry>
- Always -1 in storage, but when loaded into a tuple descriptor
+ Always -1 in storage, but when loaded into a row descriptor
in memory this may be updated to cache the offset of the attribute
- within the tuple.
+ within the row.
</entry>
</row>
<entry></entry>
<entry>
If true, this attribute is a set. In that case, what is really
- stored in the attribute is the OID of a tuple in the
+ stored in the attribute is the OID of a row in the
<structname>pg_proc</structname> catalog. The
- <structname>pg_proc</structname> tuple contains the query
+ <structname>pg_proc</structname> row contains the query
string that defines this set, i.e., the query to run to get
the set. So the <structfield>atttypid</structfield> (see
above) refers to the type returned by this query, but the
<entry><type>float4</type></entry>
<entry></entry>
<entry>
- Number of tuples in the table.
+ Number of rows in the table.
This is only an estimate used by the planner.
It is updated by <command>VACUUM</command>,
<command>ANALYZE</command>, and <command>CREATE INDEX</command>.
<entry><type>xid</type></entry>
<entry></entry>
<entry>
- All tuples inserted or deleted by transaction IDs before this one
+ All rows inserted or deleted by transaction IDs before this one
have been marked as known committed or known aborted in this database.
This is used to determine when commit-log space can be recycled.
</entry>
<entry><type>xid</type></entry>
<entry></entry>
<entry>
- All tuples inserted by transaction IDs before this one have been
+ All rows inserted by transaction IDs before this one have been
relabeled with a permanent (<quote>frozen</>) transaction ID in this
database. This is useful to check whether a database must be vacuumed
soon to avoid transaction ID wrap-around problems.
<row>
<entry><structfield>refobjid</structfield></entry>
<entry><type>oid</type></entry>
- <entry>any oid attribute</entry>
+ <entry>any OID column</entry>
<entry>The OID of the specific referenced object</entry>
</row>
<row>
<entry><structfield>indkey</structfield></entry>
<entry><type>int2vector</type></entry>
- <entry><link linkend="catalog-pg-attribute"><structname>pg_attribute</structname></link>.attnum</entry>
+ <entry><literal><link linkend="catalog-pg-attribute"><structname>pg_attribute</structname></link>.attnum</literal></entry>
<entry>
This is an array of <structfield>indnatts</structfield> (up to
<symbol>INDEX_MAX_KEYS</symbol>) values that indicate which
<entry><structfield>opcamid</structfield></entry>
<entry><type>oid</type></entry>
<entry><literal><link linkend="catalog-pg-am"><structname>pg_am</structname></link>.oid</literal></entry>
- <entry>Index access method opclass is for</entry>
+ <entry>Index access method operator class is for</entry>
</row>
<row>
<entry><structfield>tgtype</structfield></entry>
<entry><type>int2</type></entry>
<entry></entry>
- <entry>Bitmask identifying trigger conditions</entry>
+ <entry>Bitmask identifying trigger conditions</entry>
</row>
<row>
For types used in system tables, it is critical that the size
and alignment defined in <structname>pg_type</structname>
agree with the way that the compiler will lay out the column in
- a struct representing a table row.
+ a structure representing a table row.
</para>
</note></entry>
</row>
<entry></entry>
<entry><para>
<structfield>typndims</structfield> is the number of array dimensions
- for a domain that is an array (that is, typbasetype is an array type;
- the domain's typelem will match the base type's typelem).
+ for a domain that is an array (that is, <structfield>typbasetype</> is an array type;
+ the domain's <structfield>typelem</> will match the base type's <structfield>typelem</structfield>).
Zero for types other than array domains.
</para></entry>
</row>
index 46748935d25706073c154cf766c38b9246673aad..2c9a45e8adbfdc5b810cc86e9d37675f88d0683d 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.127 2003年10月22日 18:10:53 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.128 2003年11月01日 01:56:29 petere Exp $
-->
<chapter id="datatype">
@@ -165,9 +165,9 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.127 2003年10月22日 18:10:53 m
<row>
<entry><type>numeric [ (<replaceable>p</replaceable>,
- <replaceable>s</replaceable>) ]</type></entry>
+ <replaceable>s</replaceable>) ]</type></entry>
<entry><type>decimal [ (<replaceable>p</replaceable>,
- <replaceable>s</replaceable>) ]</type></entry>
+ <replaceable>s</replaceable>) ]</type></entry>
<entry>exact numeric with selectable precision</entry>
</row>
@@ -295,71 +295,71 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.127 2003年10月22日 18:10:53 m
<tgroup cols="4">
<thead>
<row>
- <entry>Name</entry>
- <entry>Storage Size</entry>
- <entry>Description</entry>
- <entry>Range</entry>
+ <entry>Name</entry>
+ <entry>Storage Size</entry>
+ <entry>Description</entry>
+ <entry>Range</entry>
</row>
</thead>
<tbody>
<row>
- <entry><type>smallint</></entry>
- <entry>2 bytes</entry>
- <entry>small-range integer</entry>
- <entry>-32768 to +32767</entry>
+ <entry><type>smallint</></entry>
+ <entry>2 bytes</entry>
+ <entry>small-range integer</entry>
+ <entry>-32768 to +32767</entry>
</row>
<row>
- <entry><type>integer</></entry>
- <entry>4 bytes</entry>
- <entry>usual choice for integer</entry>
- <entry>-2147483648 to +2147483647</entry>
+ <entry><type>integer</></entry>
+ <entry>4 bytes</entry>
+ <entry>usual choice for integer</entry>
+ <entry>-2147483648 to +2147483647</entry>
</row>
<row>
- <entry><type>bigint</></entry>
- <entry>8 bytes</entry>
- <entry>large-range integer</entry>
- <entry>-9223372036854775808 to 9223372036854775807</entry>
+ <entry><type>bigint</></entry>
+ <entry>8 bytes</entry>
+ <entry>large-range integer</entry>
+ <entry>-9223372036854775808 to 9223372036854775807</entry>
</row>
<row>
- <entry><type>decimal</></entry>
- <entry>variable</entry>
- <entry>user-specified precision, exact</entry>
- <entry>no limit</entry>
+ <entry><type>decimal</></entry>
+ <entry>variable</entry>
+ <entry>user-specified precision, exact</entry>
+ <entry>no limit</entry>
</row>
<row>
- <entry><type>numeric</></entry>
- <entry>variable</entry>
- <entry>user-specified precision, exact</entry>
- <entry>no limit</entry>
+ <entry><type>numeric</></entry>
+ <entry>variable</entry>
+ <entry>user-specified precision, exact</entry>
+ <entry>no limit</entry>
</row>
<row>
- <entry><type>real</></entry>
- <entry>4 bytes</entry>
- <entry>variable-precision, inexact</entry>
- <entry>6 decimal digits precision</entry>
+ <entry><type>real</></entry>
+ <entry>4 bytes</entry>
+ <entry>variable-precision, inexact</entry>
+ <entry>6 decimal digits precision</entry>
</row>
<row>
- <entry><type>double precision</></entry>
- <entry>8 bytes</entry>
- <entry>variable-precision, inexact</entry>
- <entry>15 decimal digits precision</entry>
+ <entry><type>double precision</></entry>
+ <entry>8 bytes</entry>
+ <entry>variable-precision, inexact</entry>
+ <entry>15 decimal digits precision</entry>
</row>
<row>
- <entry><type>serial</></entry>
- <entry>4 bytes</entry>
- <entry>autoincrementing integer</entry>
- <entry>1 to 2147483647</entry>
+ <entry><type>serial</></entry>
+ <entry>4 bytes</entry>
+ <entry>autoincrementing integer</entry>
+ <entry>1 to 2147483647</entry>
</row>
<row>
- <entry><type>bigserial</type></entry>
- <entry>8 bytes</entry>
- <entry>large autoincrementing integer</entry>
- <entry>1 to 9223372036854775807</entry>
+ <entry><type>bigserial</type></entry>
+ <entry>8 bytes</entry>
+ <entry>large autoincrementing integer</entry>
+ <entry>1 to 9223372036854775807</entry>
</row>
</tbody>
</tgroup>
@@ -727,7 +727,7 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (
column should be assigned its default value. This can be done
either by excluding the column from the list of columns in
the <command>INSERT</command> statement, or through the use of
- the <literal>DEFAULT</literal> keyword.
+ the <literal>DEFAULT</literal> keyword.
</para>
<para>
@@ -786,18 +786,18 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (
<tgroup cols="4">
<thead>
<row>
- <entry>Name</entry>
- <entry>Storage Size</entry>
- <entry>Description</entry>
- <entry>Range</entry>
+ <entry>Name</entry>
+ <entry>Storage Size</entry>
+ <entry>Description</entry>
+ <entry>Range</entry>
</row>
</thead>
<tbody>
<row>
- <entry>money</entry>
- <entry>4 bytes</entry>
- <entry>currency amount</entry>
- <entry>-21474836.48 to +21474836.47</entry>
+ <entry>money</entry>
+ <entry>4 bytes</entry>
+ <entry>currency amount</entry>
+ <entry>-21474836.48 to +21474836.47</entry>
</row>
</tbody>
</tgroup>
@@ -843,22 +843,22 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (
<tgroup cols="2">
<thead>
<row>
- <entry>Name</entry>
- <entry>Description</entry>
+ <entry>Name</entry>
+ <entry>Description</entry>
</row>
</thead>
<tbody>
<row>
- <entry><type>character varying(<replaceable>n</>)</type>, <type>varchar(<replaceable>n</>)</type></entry>
- <entry>variable-length with limit</entry>
+ <entry><type>character varying(<replaceable>n</>)</type>, <type>varchar(<replaceable>n</>)</type></entry>
+ <entry>variable-length with limit</entry>
</row>
<row>
- <entry><type>character(<replaceable>n</>)</type>, <type>char(<replaceable>n</>)</type></entry>
- <entry>fixed-length, blank padded</entry>
+ <entry><type>character(<replaceable>n</>)</type>, <type>char(<replaceable>n</>)</type></entry>
+ <entry>fixed-length, blank padded</entry>
</row>
<row>
- <entry><type>text</type></entry>
- <entry>variable unlimited length</entry>
+ <entry><type>text</type></entry>
+ <entry>variable unlimited length</entry>
</row>
</tbody>
</tgroup>
<tgroup cols="3">
<thead>
<row>
- <entry>Name</entry>
- <entry>Storage Size</entry>
- <entry>Description</entry>
+ <entry>Name</entry>
+ <entry>Storage Size</entry>
+ <entry>Description</entry>
</row>
</thead>
<tbody>
<row>
- <entry><type>"char"</type></entry>
- <entry>1 byte</entry>
- <entry>single-character internal type</entry>
+ <entry><type>"char"</type></entry>
+ <entry>1 byte</entry>
+ <entry>single-character internal type</entry>
</row>
<row>
- <entry><type>name</type></entry>
- <entry>64 bytes</entry>
- <entry>internal type for object names</entry>
+ <entry><type>name</type></entry>
+ <entry>64 bytes</entry>
+ <entry>internal type for object names</entry>
</row>
</tbody>
</tgroup>
</para>
<para>
- The <acronym>SQL</acronym> standard defines a different binary
- string type, called <type>BLOB</type> or <type>BINARY LARGE
- OBJECT</type>. The input format is different compared to
- <type>bytea</type>, but the provided functions and operators are
- mostly the same.
+ The <acronym>SQL</acronym> standard defines a different binary
+ string type, called <type>BLOB</type> or <type>BINARY LARGE
+ OBJECT</type>. The input format is different compared to
+ <type>bytea</type>, but the provided functions and operators are
+ mostly the same.
</para>
</sect1>
<para>
When <type>timestamp</> values are stored as double precision floating-point
numbers (currently the default), the effective limit of precision
- may be less than 6. Timestamp values are stored as seconds
+ may be less than 6. <type>timestamp</type> values are stored as seconds
since 2000年01月01日, and microsecond precision is achieved for dates within
a few years of 2000年01月01日, but the precision degrades for dates further
- away. When timestamps are stored as eight-byte integers (a compile-time
+ away. When <type>timestamp</type> values are stored as eight-byte integers (a compile-time
option), microsecond precision is available over the full range of
values. However eight-byte integer timestamps have a reduced range of
dates from 4713 BC up to 294276 AD.
<title>Date Input</title>
<tgroup cols="2">
<thead>
- <row>
- <entry>Example</entry>
- <entry>Description</entry>
- </row>
+ <row>
+ <entry>Example</entry>
+ <entry>Description</entry>
+ </row>
</thead>
<tbody>
- <row>
- <entry>January 8, 1999</entry>
- <entry>unambiguous in any datestyle input mode</entry>
- </row>
- <row>
- <entry>1999年01月08日</entry>
- <entry>ISO-8601, January 8 in any mode
- (recommended format)</entry>
- </row>
- <row>
- <entry>1/8/1999</entry>
- <entry>January 8 in <literal>MDY</> mode;
- August 1 in <literal>DMY</> mode</entry>
- </row>
- <row>
- <entry>1/18/1999</entry>
- <entry>January 18 in <literal>MDY</> mode;
- rejected in other modes</entry>
- </row>
- <row>
- <entry>01/02/03</entry>
- <entry>January 2, 2003 in <literal>MDY</> mode;
- February 1, 2003 in <literal>DMY</> mode;
- February 3, 2001 in <literal>YMD</> mode
- </entry>
- </row>
- <row>
- <entry>19990108</entry>
- <entry>ISO-8601; January 8, 1999 in any mode</entry>
- </row>
- <row>
- <entry>990108</entry>
- <entry>ISO-8601; January 8, 1999 in any mode</entry>
- </row>
- <row>
- <entry>1999.008</entry>
- <entry>year and day of year</entry>
- </row>
- <row>
- <entry>J2451187</entry>
- <entry>Julian day</entry>
- </row>
- <row>
- <entry>January 8, 99 BC</entry>
- <entry>year 99 before the Common Era</entry>
- </row>
+ <row>
+ <entry>January 8, 1999</entry>
+ <entry>unambiguous in any <varname>datestyle</varname> input mode</entry>
+ </row>
+ <row>
+ <entry>1999年01月08日</entry>
+ <entry>ISO-8601, January 8 in any mode
+ (recommended format)</entry>
+ </row>
+ <row>
+ <entry>1/8/1999</entry>
+ <entry>January 8 in <literal>MDY</> mode;
+ August 1 in <literal>DMY</> mode</entry>
+ </row>
+ <row>
+ <entry>1/18/1999</entry>
+ <entry>January 18 in <literal>MDY</> mode;
+ rejected in other modes</entry>
+ </row>
+ <row>
+ <entry>01/02/03</entry>
+ <entry>January 2, 2003 in <literal>MDY</> mode;
+ February 1, 2003 in <literal>DMY</> mode;
+ February 3, 2001 in <literal>YMD</> mode
+ </entry>
+ </row>
+ <row>
+ <entry>19990108</entry>
+ <entry>ISO-8601; January 8, 1999 in any mode</entry>
+ </row>
+ <row>
+ <entry>990108</entry>
+ <entry>ISO-8601; January 8, 1999 in any mode</entry>
+ </row>
+ <row>
+ <entry>1999.008</entry>
+ <entry>year and day of year</entry>
+ </row>
+ <row>
+ <entry>J2451187</entry>
+ <entry>Julian day</entry>
+ </row>
+ <row>
+ <entry>January 8, 99 BC</entry>
+ <entry>year 99 before the Common Era</entry>
+ </row>
</tbody>
</tgroup>
</table>
<table id="datatype-datetime-time-table">
<title>Time Input</title>
<tgroup cols="2">
- <thead>
- <row>
- <entry>Example</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry><literal>04:05:06.789</literal></entry>
- <entry>ISO 8601</entry>
- </row>
- <row>
- <entry><literal>04:05:06</literal></entry>
- <entry>ISO 8601</entry>
- </row>
- <row>
- <entry><literal>04:05</literal></entry>
- <entry>ISO 8601</entry>
- </row>
- <row>
- <entry><literal>040506</literal></entry>
- <entry>ISO 8601</entry>
- </row>
- <row>
- <entry><literal>04:05 AM</literal></entry>
- <entry>same as 04:05; AM does not affect value</entry>
- </row>
- <row>
- <entry><literal>04:05 PM</literal></entry>
- <entry>same as 16:05; input hour must be <= 12</entry>
- </row>
- <row>
- <entry>04:05:06.789-8</entry>
- <entry>ISO 8601</entry>
- </row>
- <row>
- <entry>04:05:06-08:00</entry>
- <entry>ISO 8601</entry>
- </row>
- <row>
- <entry>04:05-08:00</entry>
- <entry>ISO 8601</entry>
- </row>
- <row>
- <entry>040506-08</entry>
- <entry>ISO 8601</entry>
- </row>
- <row>
- <entry>04:05:06 PST</entry>
- <entry>timezone specified by name</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
+ <thead>
+ <row>
+ <entry>Example</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal>04:05:06.789</literal></entry>
+ <entry>ISO 8601</entry>
+ </row>
+ <row>
+ <entry><literal>04:05:06</literal></entry>
+ <entry>ISO 8601</entry>
+ </row>
+ <row>
+ <entry><literal>04:05</literal></entry>
+ <entry>ISO 8601</entry>
+ </row>
+ <row>
+ <entry><literal>040506</literal></entry>
+ <entry>ISO 8601</entry>
+ </row>
+ <row>
+ <entry><literal>04:05 AM</literal></entry>
+ <entry>same as 04:05; AM does not affect value</entry>
+ </row>
+ <row>
+ <entry><literal>04:05 PM</literal></entry>
+ <entry>same as 16:05; input hour must be <= 12</entry>
+ </row>
+ <row>
+ <entry><literal>04:05:06.789-8</literal></entry>
+ <entry>ISO 8601</entry>
+ </row>
+ <row>
+ <entry><literal>04:05:06-08:00</literal></entry>
+ <entry>ISO 8601</entry>
+ </row>
+ <row>
+ <entry><literal>04:05-08:00</literal></entry>
+ <entry>ISO 8601</entry>
+ </row>
+ <row>
+ <entry><literal>040506-08</literal></entry>
+ <entry>ISO 8601</entry>
+ </row>
+ <row>
+ <entry><literal>04:05:06 PST</literal></entry>
+ <entry>time zone specified by name</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
<table tocentry="1" id="datatype-timezone-table">
<title>Time Zone Input</title>
<tgroup cols="2">
- <thead>
- <row>
- <entry>Example</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>PST</entry>
- <entry>Pacific Standard Time</entry>
- </row>
- <row>
- <entry>-8:00</entry>
- <entry>ISO-8601 offset for PST</entry>
- </row>
- <row>
- <entry>-800</entry>
- <entry>ISO-8601 offset for PST</entry>
- </row>
- <row>
- <entry>-8</entry>
- <entry>ISO-8601 offset for PST</entry>
- </row>
- <row>
- <entry>zulu</entry>
- <entry>Military abbreviation for GMT</entry>
- </row>
- <row>
- <entry>z</entry>
- <entry>Short form of zulu</entry>
- </row>
- </tbody>
+ <thead>
+ <row>
+ <entry>Example</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal>PST</literal></entry>
+ <entry>Pacific Standard Time</entry>
+ </row>
+ <row>
+ <entry><literal>-8:00</literal></entry>
+ <entry>ISO-8601 offset for PST</entry>
+ </row>
+ <row>
+ <entry><literal>-800</literal></entry>
+ <entry>ISO-8601 offset for PST</entry>
+ </row>
+ <row>
+ <entry><literal>-8</literal></entry>
+ <entry>ISO-8601 offset for PST</entry>
+ </row>
+ <row>
+ <entry><literal>zulu</literal></entry>
+ <entry>Military abbreviation for GMT</entry>
+ </row>
+ <row>
+ <entry><literal>z</literal></entry>
+ <entry>Short form of <literal>zulu</literal></entry>
+ </row>
+ </tbody>
</tgroup>
</table>
</sect3>
<table id="datatype-datetime-special-table">
<title>Special Date/Time Inputs</title>
<tgroup cols="2">
- <thead>
- <row>
- <entry>Input String</entry>
+ <thead>
+ <row>
+ <entry>Input String</entry>
<entry>Valid Types</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry><literal>epoch</literal></entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal>epoch</literal></entry>
<entry><type>date</type>, <type>timestamp</type></entry>
- <entry>1970年01月01日 00:00:00+00 (Unix system time zero)</entry>
- </row>
- <row>
- <entry><literal>infinity</literal></entry>
+ <entry>1970年01月01日 00:00:00+00 (Unix system time zero)</entry>
+ </row>
+ <row>
+ <entry><literal>infinity</literal></entry>
<entry><type>timestamp</type></entry>
- <entry>later than all other time stamps</entry>
- </row>
- <row>
- <entry><literal>-infinity</literal></entry>
+ <entry>later than all other time stamps</entry>
+ </row>
+ <row>
+ <entry><literal>-infinity</literal></entry>
<entry><type>timestamp</type></entry>
- <entry>earlier than all other time stamps</entry>
- </row>
- <row>
- <entry><literal>now</literal></entry>
+ <entry>earlier than all other time stamps</entry>
+ </row>
+ <row>
+ <entry><literal>now</literal></entry>
<entry><type>date</type>, <type>time</type>, <type>timestamp</type></entry>
- <entry>current transaction's start time</entry>
- </row>
- <row>
- <entry><literal>today</literal></entry>
+ <entry>current transaction's start time</entry>
+ </row>
+ <row>
+ <entry><literal>today</literal></entry>
<entry><type>date</type>, <type>timestamp</type></entry>
- <entry>midnight today</entry>
- </row>
- <row>
- <entry><literal>tomorrow</literal></entry>
+ <entry>midnight today</entry>
+ </row>
+ <row>
+ <entry><literal>tomorrow</literal></entry>
<entry><type>date</type>, <type>timestamp</type></entry>
- <entry>midnight tomorrow</entry>
- </row>
- <row>
- <entry><literal>yesterday</literal></entry>
+ <entry>midnight tomorrow</entry>
+ </row>
+ <row>
+ <entry><literal>yesterday</literal></entry>
<entry><type>date</type>, <type>timestamp</type></entry>
- <entry>midnight yesterday</entry>
- </row>
- <row>
- <entry><literal>allballs</literal></entry>
+ <entry>midnight yesterday</entry>
+ </row>
+ <row>
+ <entry><literal>allballs</literal></entry>
<entry><type>time</type></entry>
- <entry>00:00:00.00 UTC</entry>
- </row>
- </tbody>
+ <entry>00:00:00.00 UTC</entry>
+ </row>
+ </tbody>
</tgroup>
</table>
<title>Date/Time Output Styles</title>
<tgroup cols="3">
<thead>
- <row>
- <entry>Style Specification</entry>
- <entry>Description</entry>
- <entry>Example</entry>
- </row>
+ <row>
+ <entry>Style Specification</entry>
+ <entry>Description</entry>
+ <entry>Example</entry>
+ </row>
</thead>
<tbody>
- <row>
- <entry>ISO</entry>
- <entry>ISO 8601/SQL standard</entry>
- <entry>1997年12月17日 07:37:16-08</entry>
- </row>
- <row>
- <entry>SQL</entry>
- <entry>traditional style</entry>
- <entry>12/17/1997 07:37:16.00 PST</entry>
- </row>
- <row>
- <entry>POSTGRES</entry>
- <entry>original style</entry>
- <entry>Wed Dec 17 07:37:16 1997 PST</entry>
- </row>
- <row>
- <entry>German</entry>
- <entry>regional style</entry>
- <entry>17.12.1997 07:37:16.00 PST</entry>
- </row>
+ <row>
+ <entry>ISO</entry>
+ <entry>ISO 8601/SQL standard</entry>
+ <entry>1997年12月17日 07:37:16-08</entry>
+ </row>
+ <row>
+ <entry>SQL</entry>
+ <entry>traditional style</entry>
+ <entry>12/17/1997 07:37:16.00 PST</entry>
+ </row>
+ <row>
+ <entry>POSTGRES</entry>
+ <entry>original style</entry>
+ <entry>Wed Dec 17 07:37:16 1997 PST</entry>
+ </row>
+ <row>
+ <entry>German</entry>
+ <entry>regional style</entry>
+ <entry>17.12.1997 07:37:16.00 PST</entry>
+ </row>
</tbody>
</tgroup>
</table>
<title>Date Order Conventions</title>
<tgroup cols="3">
<thead>
- <row>
- <entry>DateStyle setting</entry>
- <entry>Input Ordering</entry>
- <entry>Example Output</entry>
- </row>
+ <row>
+ <entry><varname>datestyle</varname> Setting</entry>
+ <entry>Input Ordering</entry>
+ <entry>Example Output</entry>
+ </row>
</thead>
<tbody>
- <row>
- <entry><literal>SQL, DMY</></entry>
- <entry><replaceable>day</replaceable>/<replaceable>month</replaceable>/<replaceable>year</replaceable></entry>
- <entry>17/12/1997 15:37:16.00 CET</entry>
- </row>
- <row>
- <entry><literal>SQL, MDY</></entry>
- <entry><replaceable>month</replaceable>/<replaceable>day</replaceable>/<replaceable>year</replaceable></entry>
- <entry>12/17/1997 07:37:16.00 PST</entry>
- </row>
- <row>
- <entry><literal>Postgres, DMY</></entry>
- <entry><replaceable>day</replaceable>/<replaceable>month</replaceable>/<replaceable>year</replaceable></entry>
- <entry>Wed 17 Dec 07:37:16 1997 PST</entry>
- </row>
+ <row>
+ <entry><literal>SQL, DMY</></entry>
+ <entry><replaceable>day</replaceable>/<replaceable>month</replaceable>/<replaceable>year</replaceable></entry>
+ <entry>17/12/1997 15:37:16.00 CET</entry>
+ </row>
+ <row>
+ <entry><literal>SQL, MDY</></entry>
+ <entry><replaceable>month</replaceable>/<replaceable>day</replaceable>/<replaceable>year</replaceable></entry>
+ <entry>12/17/1997 07:37:16.00 PST</entry>
+ </row>
+ <row>
+ <entry><literal>Postgres, DMY</></entry>
+ <entry><replaceable>day</replaceable>/<replaceable>month</replaceable>/<replaceable>year</replaceable></entry>
+ <entry>Wed 17 Dec 07:37:16 1997 PST</entry>
+ </row>
</tbody>
</tgroup>
</table>
<itemizedlist>
<listitem>
<para>
- Although the <type>date</type> type
- does not have an associated time zone, the
- <type>time</type> type can.
- Time zones in the real world can have no meaning unless
- associated with a date as well as a time
- since the offset may vary through the year with daylight-saving
- time boundaries.
+ Although the <type>date</type> type
+ does not have an associated time zone, the
+ <type>time</type> type can.
+ Time zones in the real world can have no meaning unless
+ associated with a date as well as a time
+ since the offset may vary through the year with daylight-saving
+ time boundaries.
</para>
</listitem>
<listitem>
<para>
- The default time zone is specified as a constant numeric offset
- from <acronym>UTC</>. It is not possible to adapt to daylight-saving
- time when doing date/time arithmetic across
- <acronym>DST</acronym> boundaries.
+ The default time zone is specified as a constant numeric offset
+ from <acronym>UTC</>. It is not possible to adapt to daylight-saving
+ time when doing date/time arithmetic across
+ <acronym>DST</acronym> boundaries.
</para>
</listitem>
<itemizedlist>
<listitem>
<para>
- The <envar>TZ</envar> environment variable on the server host
- is used by the server as the default time zone, if no other is
- specified.
+ The <envar>TZ</envar> environment variable on the server host
+ is used by the server as the default time zone, if no other is
+ specified.
</para>
</listitem>
<listitem>
<para>
- The <varname>timezone</varname> configuration parameter can be
- set in the file <filename>postgresql.conf</>.
+ The <varname>timezone</varname> configuration parameter can be
+ set in the file <filename>postgresql.conf</>.
</para>
</listitem>
<listitem>
<para>
- The <envar>PGTZ</envar> environment variable, if set at the
- client, is used by <application>libpq</application>
- applications to send a <command>SET TIME ZONE</command>
- command to the server upon connection.
+ The <envar>PGTZ</envar> environment variable, if set at the
+ client, is used by <application>libpq</application>
+ applications to send a <command>SET TIME ZONE</command>
+ command to the server upon connection.
</para>
</listitem>
<listitem>
<para>
- The <acronym>SQL</acronym> command <command>SET TIME ZONE</command>
- sets the time zone for the session.
+ The <acronym>SQL</acronym> command <command>SET TIME ZONE</command>
+ sets the time zone for the session.
</para>
</listitem>
</itemizedlist>
<tgroup cols="4">
<thead>
<row>
- <entry>Name</entry>
- <entry>Storage Size</entry>
- <entry>Representation</entry>
- <entry>Description</entry>
+ <entry>Name</entry>
+ <entry>Storage Size</entry>
+ <entry>Representation</entry>
+ <entry>Description</entry>
</row>
</thead>
<tbody>
<row>
- <entry><type>point</type></entry>
- <entry>16 bytes</entry>
- <entry>Point on the plane</entry>
- <entry>(x,y)</entry>
+ <entry><type>point</type></entry>
+ <entry>16 bytes</entry>
+ <entry>Point on the plane</entry>
+ <entry>(x,y)</entry>
</row>
<row>
- <entry><type>line</type></entry>
- <entry>32 bytes</entry>
- <entry>Infinite line (not fully implemented)</entry>
- <entry>((x1,y1),(x2,y2))</entry>
+ <entry><type>line</type></entry>
+ <entry>32 bytes</entry>
+ <entry>Infinite line (not fully implemented)</entry>
+ <entry>((x1,y1),(x2,y2))</entry>
</row>
<row>
- <entry><type>lseg</type></entry>
- <entry>32 bytes</entry>
- <entry>Finite line segment</entry>
- <entry>((x1,y1),(x2,y2))</entry>
+ <entry><type>lseg</type></entry>
+ <entry>32 bytes</entry>
+ <entry>Finite line segment</entry>
+ <entry>((x1,y1),(x2,y2))</entry>
</row>
<row>
- <entry><type>box</type></entry>
- <entry>32 bytes</entry>
- <entry>Rectangular box</entry>
- <entry>((x1,y1),(x2,y2))</entry>
+ <entry><type>box</type></entry>
+ <entry>32 bytes</entry>
+ <entry>Rectangular box</entry>
+ <entry>((x1,y1),(x2,y2))</entry>
</row>
<row>
- <entry><type>path</type></entry>
- <entry>16+16n bytes</entry>
- <entry>Closed path (similar to polygon)</entry>
- <entry>((x1,y1),...)</entry>
+ <entry><type>path</type></entry>
+ <entry>16+16n bytes</entry>
+ <entry>Closed path (similar to polygon)</entry>
+ <entry>((x1,y1),...)</entry>
</row>
<row>
- <entry><type>path</type></entry>
- <entry>16+16n bytes</entry>
- <entry>Open path</entry>
- <entry>[(x1,y1),...]</entry>
+ <entry><type>path</type></entry>
+ <entry>16+16n bytes</entry>
+ <entry>Open path</entry>
+ <entry>[(x1,y1),...]</entry>
</row>
<row>
- <entry><type>polygon</type></entry>
- <entry>40+16n bytes</entry>
- <entry>Polygon (similar to closed path)</entry>
- <entry>((x1,y1),...)</entry>
+ <entry><type>polygon</type></entry>
+ <entry>40+16n bytes</entry>
+ <entry>Polygon (similar to closed path)</entry>
+ <entry>((x1,y1),...)</entry>
</row>
<row>
- <entry><type>circle</type></entry>
- <entry>24 bytes</entry>
- <entry>Circle</entry>
- <entry><(x,y),r> (center and radius)</entry>
+ <entry><type>circle</type></entry>
+ <entry>24 bytes</entry>
+ <entry>Circle</entry>
+ <entry><(x,y),r> (center and radius)</entry>
</row>
</tbody>
</tgroup>
<tgroup cols="3">
<thead>
<row>
- <entry>Name</entry>
- <entry>Storage Size</entry>
- <entry>Description</entry>
+ <entry>Name</entry>
+ <entry>Storage Size</entry>
+ <entry>Description</entry>
</row>
</thead>
<tbody>
<row>
- <entry><type>cidr</type></entry>
- <entry>12 or 24 bytes</entry>
- <entry>IPv4 or IPv6 networks</entry>
+ <entry><type>cidr</type></entry>
+ <entry>12 or 24 bytes</entry>
+ <entry>IPv4 or IPv6 networks</entry>
</row>
<row>
- <entry><type>inet</type></entry>
- <entry>12 or 24 bytes</entry>
- <entry>IPv4 and IPv6 hosts and networks</entry>
+ <entry><type>inet</type></entry>
+ <entry>12 or 24 bytes</entry>
+ <entry>IPv4 and IPv6 hosts and networks</entry>
</row>
<row>
- <entry><type>macaddr</type></entry>
- <entry>6 bytes</entry>
- <entry>MAC addresses</entry>
+ <entry><type>macaddr</type></entry>
+ <entry>6 bytes</entry>
+ <entry>MAC addresses</entry>
</row>
</tbody>
<title><type>cidr</> Type Input Examples</title>
<tgroup cols="3">
<thead>
- <row>
- <entry><type>cidr</type> Input</entry>
- <entry><type>cidr</type> Output</entry>
- <entry><literal><function>abbrev</function>(<type>cidr</type>)</literal></entry>
- </row>
+ <row>
+ <entry><type>cidr</type> Input</entry>
+ <entry><type>cidr</type> Output</entry>
+ <entry><literal><function>abbrev</function>(<type>cidr</type>)</literal></entry>
+ </row>
</thead>
<tbody>
- <row>
- <entry>192.168.100.128/25</entry>
- <entry>192.168.100.128/25</entry>
- <entry>192.168.100.128/25</entry>
- </row>
- <row>
- <entry>192.168/24</entry>
- <entry>192.168.0.0/24</entry>
- <entry>192.168.0/24</entry>
- </row>
- <row>
- <entry>192.168/25</entry>
- <entry>192.168.0.0/25</entry>
- <entry>192.168.0.0/25</entry>
- </row>
- <row>
- <entry>192.168.1</entry>
- <entry>192.168.1.0/24</entry>
- <entry>192.168.1/24</entry>
- </row>
- <row>
- <entry>192.168</entry>
- <entry>192.168.0.0/24</entry>
- <entry>192.168.0/24</entry>
- </row>
- <row>
- <entry>128.1</entry>
- <entry>128.1.0.0/16</entry>
- <entry>128.1/16</entry>
- </row>
- <row>
- <entry>128</entry>
- <entry>128.0.0.0/16</entry>
- <entry>128.0/16</entry>
- </row>
- <row>
- <entry>128.1.2</entry>
- <entry>128.1.2.0/24</entry>
- <entry>128.1.2/24</entry>
- </row>
- <row>
- <entry>10.1.2</entry>
- <entry>10.1.2.0/24</entry>
- <entry>10.1.2/24</entry>
- </row>
- <row>
- <entry>10.1</entry>
- <entry>10.1.0.0/16</entry>
- <entry>10.1/16</entry>
- </row>
- <row>
- <entry>10</entry>
- <entry>10.0.0.0/8</entry>
- <entry>10/8</entry>
- </row>
- <row>
- <entry>10.1.2.3/32</entry>
- <entry>10.1.2.3/32</entry>
+ <row>
+ <entry>192.168.100.128/25</entry>
+ <entry>192.168.100.128/25</entry>
+ <entry>192.168.100.128/25</entry>
+ </row>
+ <row>
+ <entry>192.168/24</entry>
+ <entry>192.168.0.0/24</entry>
+ <entry>192.168.0/24</entry>
+ </row>
+ <row>
+ <entry>192.168/25</entry>
+ <entry>192.168.0.0/25</entry>
+ <entry>192.168.0.0/25</entry>
+ </row>
+ <row>
+ <entry>192.168.1</entry>
+ <entry>192.168.1.0/24</entry>
+ <entry>192.168.1/24</entry>
+ </row>
+ <row>
+ <entry>192.168</entry>
+ <entry>192.168.0.0/24</entry>
+ <entry>192.168.0/24</entry>
+ </row>
+ <row>
+ <entry>128.1</entry>
+ <entry>128.1.0.0/16</entry>
+ <entry>128.1/16</entry>
+ </row>
+ <row>
+ <entry>128</entry>
+ <entry>128.0.0.0/16</entry>
+ <entry>128.0/16</entry>
+ </row>
+ <row>
+ <entry>128.1.2</entry>
+ <entry>128.1.2.0/24</entry>
+ <entry>128.1.2/24</entry>
+ </row>
+ <row>
+ <entry>10.1.2</entry>
+ <entry>10.1.2.0/24</entry>
+ <entry>10.1.2/24</entry>
+ </row>
+ <row>
+ <entry>10.1</entry>
+ <entry>10.1.0.0/16</entry>
+ <entry>10.1/16</entry>
+ </row>
+ <row>
+ <entry>10</entry>
+ <entry>10.0.0.0/8</entry>
+ <entry>10/8</entry>
+ </row>
+ <row>
+ <entry>10.1.2.3/32</entry>
+ <entry>10.1.2.3/32</entry>
<entry>10.1.2.3/32</entry>
- </row>
+ </row>
<row>
- <entry>2001:4f8:3:ba::/64</entry>
- <entry>2001:4f8:3:ba::/64</entry>
- <entry>2001:4f8:3:ba::/64</entry>
- </row>
+ <entry>2001:4f8:3:ba::/64</entry>
+ <entry>2001:4f8:3:ba::/64</entry>
+ <entry>2001:4f8:3:ba::/64</entry>
+ </row>
<row>
- <entry>2001:4f8:3:ba:2e0:81ff:fe22:d1f1/128</entry>
- <entry>2001:4f8:3:ba:2e0:81ff:fe22:d1f1/128</entry>
- <entry>2001:4f8:3:ba:2e0:81ff:fe22:d1f1</entry>
- </row>
- <row>
- <entry>::ffff:1.2.3.0/120</entry>
- <entry>::ffff:1.2.3.0/120</entry>
+ <entry>2001:4f8:3:ba:2e0:81ff:fe22:d1f1/128</entry>
+ <entry>2001:4f8:3:ba:2e0:81ff:fe22:d1f1/128</entry>
+ <entry>2001:4f8:3:ba:2e0:81ff:fe22:d1f1</entry>
+ </row>
+ <row>
+ <entry>::ffff:1.2.3.0/120</entry>
+ <entry>::ffff:1.2.3.0/120</entry>
<entry>::ffff:1.2.3/120</entry>
- </row>
- <row>
- <entry>::ffff:1.2.3.0/128</entry>
- <entry>::ffff:1.2.3.0/128</entry>
+ </row>
+ <row>
+ <entry>::ffff:1.2.3.0/128</entry>
+ <entry>::ffff:1.2.3.0/128</entry>
<entry>::ffff:1.2.3.0/128</entry>
- </row>
+ </row>
</tbody>
</tgroup>
</table>
<tip>
<para>
- If you do not like the output format for <type>inet</type> or
- <type>cidr</type> values, try the functions <function>host</>,
- <function>text</>, and <function>abbrev</>.
- </para>
+ If you do not like the output format for <type>inet</type> or
+ <type>cidr</type> values, try the functions <function>host</>,
+ <function>text</>, and <function>abbrev</>.
+ </para>
</tip>
</sect2>
<tgroup cols="4">
<thead>
<row>
- <entry>Name</entry>
- <entry>References</entry>
- <entry>Description</entry>
- <entry>Value Example</entry>
+ <entry>Name</entry>
+ <entry>References</entry>
+ <entry>Description</entry>
+ <entry>Value Example</entry>
</row>
</thead>
<tbody>
<row>
- <entry><type>oid</></entry>
- <entry>any</entry>
- <entry>numeric object identifier</entry>
- <entry><literal>564182</></entry>
+ <entry><type>oid</></entry>
+ <entry>any</entry>
+ <entry>numeric object identifier</entry>
+ <entry><literal>564182</></entry>
</row>
<row>
- <entry><type>regproc</></entry>
- <entry><structname>pg_proc</></entry>
- <entry>function name</entry>
- <entry><literal>sum</></entry>
+ <entry><type>regproc</></entry>
+ <entry><structname>pg_proc</></entry>
+ <entry>function name</entry>
+ <entry><literal>sum</></entry>
</row>
<row>
- <entry><type>regprocedure</></entry>
- <entry><structname>pg_proc</></entry>
- <entry>function with argument types</entry>
- <entry><literal>sum(int4)</></entry>
+ <entry><type>regprocedure</></entry>
+ <entry><structname>pg_proc</></entry>
+ <entry>function with argument types</entry>
+ <entry><literal>sum(int4)</></entry>
</row>
<row>
- <entry><type>regoper</></entry>
- <entry><structname>pg_operator</></entry>
- <entry>operator name</entry>
- <entry><literal>+</></entry>
+ <entry><type>regoper</></entry>
+ <entry><structname>pg_operator</></entry>
+ <entry>operator name</entry>
+ <entry><literal>+</></entry>
</row>
<row>
- <entry><type>regoperator</></entry>
- <entry><structname>pg_operator</></entry>
- <entry>operator with argument types</entry>
- <entry><literal>*(integer,integer)</> or <literal>-(NONE,integer)</></entry>
+ <entry><type>regoperator</></entry>
+ <entry><structname>pg_operator</></entry>
+ <entry>operator with argument types</entry>
+ <entry><literal>*(integer,integer)</> or <literal>-(NONE,integer)</></entry>
</row>
<row>
- <entry><type>regclass</></entry>
- <entry><structname>pg_class</></entry>
- <entry>relation name</entry>
- <entry><literal>pg_type</></entry>
+ <entry><type>regclass</></entry>
+ <entry><structname>pg_class</></entry>
+ <entry>relation name</entry>
+ <entry><literal>pg_type</></entry>
</row>
<row>
- <entry><type>regtype</></entry>
- <entry><structname>pg_type</></entry>
- <entry>data type name</entry>
- <entry><literal>integer</></entry>
+ <entry><type>regtype</></entry>
+ <entry><structname>pg_type</></entry>
+ <entry>data type name</entry>
+ <entry><literal>integer</></entry>
</row>
</tbody>
</tgroup>
<para>
A final identifier type used by the system is <type>tid</>, or tuple
- identifier. This is the data type of the system column
+ identifier (row identifier). This is the data type of the system column
<structfield>ctid</>. A tuple ID is a pair
(block number, tuple index within block) that identifies the
- physical location of the tuple within its table.
+ physical location of the row within its table.
</para>
<para>
<tgroup cols="2">
<thead>
<row>
- <entry>Name</entry>
- <entry>Description</entry>
+ <entry>Name</entry>
+ <entry>Description</entry>
</row>
</thead>
<tbody>
<row>
- <entry><type>any</></entry>
- <entry>Indicates that a function accepts any input data type whatever.</entry>
+ <entry><type>any</></entry>
+ <entry>Indicates that a function accepts any input data type whatever.</entry>
</row>
<row>
- <entry><type>anyarray</></entry>
- <entry>Indicates that a function accepts any array data type
- (see <xref linkend="extend-types-polymorphic">).</entry>
+ <entry><type>anyarray</></entry>
+ <entry>Indicates that a function accepts any array data type
+ (see <xref linkend="extend-types-polymorphic">).</entry>
</row>
<row>
- <entry><type>anyelement</></entry>
- <entry>Indicates that a function accepts any data type
- (see <xref linkend="extend-types-polymorphic">).</entry>
+ <entry><type>anyelement</></entry>
+ <entry>Indicates that a function accepts any data type
+ (see <xref linkend="extend-types-polymorphic">).</entry>
</row>
<row>
- <entry><type>cstring</></entry>
- <entry>Indicates that a function accepts or returns a null-terminated C string.</entry>
+ <entry><type>cstring</></entry>
+ <entry>Indicates that a function accepts or returns a null-terminated C string.</entry>
</row>
<row>
- <entry><type>internal</></entry>
- <entry>Indicates that a function accepts or returns a server-internal
- data type.</entry>
+ <entry><type>internal</></entry>
+ <entry>Indicates that a function accepts or returns a server-internal
+ data type.</entry>
</row>
<row>
- <entry><type>language_handler</></entry>
- <entry>A procedural language call handler is declared to return <type>language_handler</>.</entry>
+ <entry><type>language_handler</></entry>
+ <entry>A procedural language call handler is declared to return <type>language_handler</>.</entry>
</row>
<row>
- <entry><type>record</></entry>
- <entry>Identifies a function returning an unspecified row type.</entry>
+ <entry><type>record</></entry>
+ <entry>Identifies a function returning an unspecified row type.</entry>
</row>
<row>
- <entry><type>trigger</></entry>
- <entry>A trigger function is declared to return <type>trigger.</></entry>
+ <entry><type>trigger</></entry>
+ <entry>A trigger function is declared to return <type>trigger.</></entry>
</row>
<row>
- <entry><type>void</></entry>
- <entry>Indicates that a function returns no value.</entry>
+ <entry><type>void</></entry>
+ <entry>Indicates that a function returns no value.</entry>
</row>
<row>
- <entry><type>opaque</></entry>
- <entry>An obsolete type name that formerly served all the above purposes.</entry>
+ <entry><type>opaque</></entry>
+ <entry>An obsolete type name that formerly served all the above purposes.</entry>
</row>
</tbody>
</tgroup>
index 9b2857c1d5a8c13725a670ae11c66bbdcdb364ab..855369dbb66127c5b8abf434d6872743cb6e3679 100644 (file)
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ddl.sgml,v 1.20 2003年10月28日 20:18:09 tgl Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ddl.sgml,v 1.21 2003年11月01日 01:56:29 petere Exp $ -->
<chapter id="ddl">
<title>Data Definition</title>
<para>
The identity (transaction ID) of the inserting transaction for
- this tuple. (Note: In this context, a tuple is an individual
- state of a row; each update of a row creates a new tuple for the
- same logical row.)
+ this row version. (A row version is an individual state of a
+ row; each update of a row creates a new row version for the same
+ logical row.)
</para>
</listitem>
</varlistentry>
<para>
The identity (transaction ID) of the deleting transaction, or
- zero for an undeleted tuple. It is possible for this column to
- be nonzero in a visible tuple: That usually indicates that the
+ zero for an undeleted row version. It is possible for this column to
+ be nonzero in a visible row version: That usually indicates that the
deleting transaction hasn't committed yet, or that an attempted
deletion was rolled back.
</para>
</indexterm>
<para>
- The physical location of the tuple within its table. Note that
+ The physical location of the row version within its table. Note that
although the <structfield>ctid</structfield> can be used to
- locate the tuple very quickly, a row's
+ locate the row version very quickly, a row's
<structfield>ctid</structfield> will change each time it is
updated or moved by <command>VACUUM FULL</>. Therefore
<structfield>ctid</structfield> is useless as a long-term row
of 2<superscript>32</> (4 billion) <acronym>SQL</acronym> commands
within a single transaction. In practice this limit is not a
problem --- note that the limit is on number of
- <acronym>SQL</acronym> commands, not number of tuples processed.
+ <acronym>SQL</acronym> commands, not number of rows processed.
</para>
</sect1>
</para>
<para>
- In some cases you may wish to know which table a particular tuple
+ In some cases you may wish to know which table a particular row
originated from. There is a system column called
<structfield>TABLEOID</structfield> in each table which can tell you the
originating table:
index 96ab3dfd7be4a390b5459054f56f03a8ca1c27ce..71373bbd19d9b91da58447028107904f4fd4945f 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.176 2003年09月30日 03:22:33 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.177 2003年11月01日 01:56:29 petere Exp $
PostgreSQL documentation
-->
indicates <type>double precision</type>. Many of these functions
are provided in multiple forms with different argument types.
Except where noted, any given form of a function returns the same
- datatype as its argument.
+ datatype as its argument.
The functions working with <type>double precision</type> data are mostly
implemented on top of the host system's C library; accuracy and behavior in
boundary cases may therefore vary depending on the host system.
@@ -3182,7 +3182,7 @@ substring('foobar' from 'o(.)b') <lineannotation>o</lineannotation>
<row>
<entry> <literal>\f</> </entry>
- <entry> formfeed, as in C </entry>
+ <entry> formfeed, as in C </entry>
</row>
<row>
@@ -4869,7 +4869,7 @@ substring('foobar' from 'o(.)b') <lineannotation>o</lineannotation>
</table>
<para>
- In addition to these functions, the SQL <literal>OVERLAPS</> keyword is
+ In addition to these functions, the SQL <literal>OVERLAPS</> operator is
supported:
<synopsis>
( <replaceable>start1</replaceable>, <replaceable>end1</replaceable> ) OVERLAPS ( <replaceable>start2</replaceable>, <replaceable>end2</replaceable> )
@@ -4877,8 +4877,8 @@ substring('foobar' from 'o(.)b') <lineannotation>o</lineannotation>
</synopsis>
This expression yields true when two time periods (defined by their
endpoints) overlap, false when they do not overlap. The endpoints
- can be specified as pairs of dates, times, or timestamps; or as
- a date, time, or timestamp followed by an interval.
+ can be specified as pairs of dates, times, or timestamps; or as
+ a date, time, or timestamp followed by an interval.
</para>
<screen>
the intent is to allow a single transaction to have a consistent
notion of the <quote>current</quote> time, so that multiple
modifications within the same transaction bear the same
- timestamp. <function>timeofday()</function>
+ timestamp. <function>timeofday()</function>
returns the wall-clock time and does advance during transactions.
</para>
<row>
<entry><literal><function>hostmask</function>(<type>inet</type>)</literal></entry>
<entry><type>inet</type></entry>
- <entry>construct hostmask for network</entry>
+ <entry>construct hostmask for network</entry>
<entry><literal>hostmask('192.168.23.20/30')</literal></entry>
<entry><literal>0.0.0.3</literal></entry>
</row>
index 09eb5234d9f1b5a7cf8d8ed71686a9f9a39c35a2..026ad9f9c7a82cb6172498fc3e351c01569e76f0 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/Attic/indexcost.sgml,v 2.16 2003年02月08日 20:20:53 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/Attic/indexcost.sgml,v 2.17 2003年11月01日 01:56:29 petere Exp $
-->
<chapter id="indexcost">
@@ -39,7 +39,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/indexcost.sgml,v 2.16 2003年02月08日 20:2
The amcostestimate function is given a list of WHERE clauses that have
been determined to be usable with the index. It must return estimates
of the cost of accessing the index and the selectivity of the WHERE
- clauses (that is, the fraction of main-table tuples that will be
+ clauses (that is, the fraction of main-table rows that will be
retrieved during the index scan). For simple cases, nearly all the
work of the cost estimator can be done by calling standard routines
in the optimizer; the point of having an amcostestimate function is
The index access costs should be computed in the units used by
<filename>src/backend/optimizer/path/costsize.c</filename>: a sequential disk block fetch
has cost 1.0, a nonsequential fetch has cost random_page_cost, and
- the cost of processing one index tuple should usually be taken as
+ the cost of processing one index row should usually be taken as
cpu_index_tuple_cost (which is a user-adjustable optimizer parameter).
In addition, an appropriate multiple of cpu_operator_cost should be charged
for any comparison operators invoked during index processing (especially
<para>
The access costs should include all disk and CPU costs associated with
scanning the index itself, but NOT the costs of retrieving or processing
- the main-table tuples that are identified by the index.
+ the main-table rows that are identified by the index.
</para>
<para>
The <quote>start-up cost</quote> is the part of the total scan cost that must be expended
- before we can begin to fetch the first tuple. For most indexes this can
+ before we can begin to fetch the first row. For most indexes this can
be taken as zero, but an index type with a high start-up cost might want
to set it nonzero.
</para>
<para>
The indexSelectivity should be set to the estimated fraction of the main
- table tuples that will be retrieved during the index scan. In the case
+ table rows that will be retrieved during the index scan. In the case
of a lossy index, this will typically be higher than the fraction of
- tuples that actually pass the given qual conditions.
+ rows that actually pass the given qual conditions.
</para>
<para>
The indexCorrelation should be set to the correlation (ranging between
-1.0 and 1.0) between the index order and the table order. This is used
- to adjust the estimate for the cost of fetching tuples from the main
+ to adjust the estimate for the cost of fetching rows from the main
table.
</para>
<step>
<para>
- Estimate and return the fraction of main-table tuples that will be visited
+ Estimate and return the fraction of main-table rows that will be visited
based on the given qual conditions. In the absence of any index-type-specific
knowledge, use the standard optimizer function <function>clauselist_selectivity()</function>:
<step>
<para>
- Estimate the number of index tuples that will be visited during the
+ Estimate the number of index rows that will be visited during the
scan. For many index types this is the same as indexSelectivity times
- the number of tuples in the index, but it might be more. (Note that the
- index's size in pages and tuples is available from the IndexOptInfo struct.)
+ the number of rows in the index, but it might be more. (Note that the
+ index's size in pages and rows is available from the IndexOptInfo struct.)
</para>
</step>
/*
* Our generic assumption is that the index pages will be read
* sequentially, so they have cost 1.0 each, not random_page_cost.
- * Also, we charge for evaluation of the indexquals at each index tuple.
+ * Also, we charge for evaluation of the indexquals at each index row.
* All the costs are assumed to be paid incrementally during the scan.
*/
cost_qual_eval(&index_qual_cost, indexQuals);
index 72141f8c734ad0bd1b945a95eb59319e238a0637..787ca5eea20a94d41759d40e6d064802b150e8d1 100644 (file)
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.174 2003年10月29日 13:42:55 momjian Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.175 2003年11月01日 01:56:29 petere Exp $ -->
<chapter id="installation">
<title><![%standalone-include[<productname>PostgreSQL</>]]>
<term><option>--enable-thread-safety</option></term>
<listitem>
<para>
- Allow separate libpq and ecpg threads to safely control their
- private connection handles.
+ Allow separate threads in <application>libpq</application>
+ and <application>ECPG</application> programs to safely
+ control their private connection handles.
</para>
</listitem>
</varlistentry>
index bff52a9668b1ae11acc218fc602b50b8dc641f58..255b6d6b9ade00ce2eeb943f832c27b3646b7e4e 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.49 2003年09月20日 20:12:05 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.50 2003年11月01日 01:56:29 petere Exp $
-->
<chapter id="jdbc">
<sect1 id="jdbc-callproc">
<title>Calling Stored Functions</title>
- <para><productname>PostgreSQL's</productname> jdbc driver fully
+ <para><productname>PostgreSQL's</productname> JDBC driver fully
supports calling <productname>PostgreSQL</productname> stored
functions.</para>
<para>When calling a function that returns
a <type>refcursor</type> you must cast the return type
- of getObject to
+ of <function>getObject</function> to
a <classname>ResultSet</classname></para>
<programlisting>
<para>
<productname>PostgreSQL</productname> is an extensible database
- system. You can add your own functions to the backend, which can
+ system. You can add your own functions to the server, which can
then be called from queries, or even add your own data types. As
these are facilities unique to <productname>PostgreSQL</productname>,
we support them from Java, with a set of extension
public Fastpath getFastpathAPI() throws SQLException
</synopsis>
<para>
- This returns the Fastpath <acronym>API</acronym> for the
+ This returns the fast-path <acronym>API</acronym> for the
current connection. It is primarily used by the Large Object
<acronym>API</acronym>.
</para>
@@ -1017,15 +1017,15 @@ Fastpath fp = ((org.postgresql.PGConnection)myconn).getFastpathAPI();
<formalpara>
<title>Returns:</title>
<para>
- Fastpath object allowing access to functions on the
- <productname>PostgreSQL</productname> backend.
+ <classname>Fastpath</> object allowing access to functions on the
+ <productname>PostgreSQL</productname> server.
</para>
</formalpara>
<formalpara>
<title>Throws:</title>
<para>
- <classname>SQLException</> by Fastpath when initializing for first time
+ <classname>SQLException</> by <classname>Fastpath</> when initializing for first time
</para>
</formalpara>
</listitem>
<para>
<classname>Fastpath</classname> is an <acronym>API</acronym> that
exists within the <application>libpq</application> C interface, and allows a client machine
- to execute a function on the database backend. Most client code
+ to execute a function on the database server. Most client code
will not need to use this method, but it is provided because the
Large Object <acronym>API</acronym> uses it.
</para>
@@ -1134,7 +1134,7 @@ Fastpath fp = ((org.postgresql.PGConnection)conn).getFastpathAPI();
the <function>getFastpathAPI()</function> is an extension method,
not part of <acronym>JDBC</acronym>. Once you have a
<classname>Fastpath</classname> instance, you can use the
- <function>fastpath()</function> methods to execute a backend
+ <function>fastpath()</function> methods to execute a server
function.
</para>
FastpathArg args[]) throws SQLException
</synopsis>
<para>
- Send a function call to the <productname>PostgreSQL</productname> backend.
+ Send a function call to the <productname>PostgreSQL</productname> server.
</para>
<formalpara>
<parameter>resulttype</> - True if the result is an integer, false
for
other results
- <parameter>args</> - <classname>FastpathArguments</classname> to pass to fastpath
+ <parameter>args</> - <classname>FastpathArguments</classname> to pass to fast-path call
</para>
</formalpara>
FastpathArg args[]) throws SQLException
</synopsis>
<para>
- Send a function call to the <productname>PostgreSQL</productname> backend by name.
+ Send a function call to the <productname>PostgreSQL</productname> server by name.
</para>
<note>
The mapping for the procedure name to function id needs to
exist, usually to an earlier call to <function>addfunction()</function>. This is
the preferred method to call, as function id's can/may change
- between versions of the backend. For an example of how this
+ between versions of the server. For an example of how this
works, refer to org.postgresql.LargeObject
</para>
</note>
<parameter>resulttype</> - True if the result is an integer, false
for
other results
- <parameter>args</> - <classname>FastpathArguments</classname> to pass to fastpath
+ <parameter>args</> - <classname>FastpathArguments</classname> to pass to fast-path call
</para>
</formalpara>
</synopsis>
<para>
- Each fastpath call requires an array of arguments, the number and
+ Each fast-path call requires an array of arguments, the number and
type dependent on the function being called. This class
implements methods needed to provide this capability.
</para>
Cloneable
This implements a line consisting of two points. Currently line is
-not yet implemented in the backend, but this class ensures that when
+not yet implemented in the server, but this class ensures that when
it's done were ready for it.
Variables
index 1f81223b507d52e2612422c16863122b09d8dabe..4431df7911ca71d7415b9dc54bb9276320b1c4d0 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.140 2003年10月17日 18:57:01 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.141 2003年11月01日 01:56:29 petere Exp $
-->
<chapter id="libpq">
@@ -92,7 +92,7 @@ PGconn *PQconnectdb(const char *conninfo);
</para>
<para>
- The currently recognized parameter keywords are:
+ The currently recognized parameter keywords are:
<variablelist>
<varlistentry>
@@ -307,7 +307,7 @@ PGconn *PQsetdbLogin(const char *pghost,
<para>
This is the predecessor of <function>PQconnectdb</function> with a fixed
set of parameters. It has the same functionality except that the
- missing parameters will always take on default values. Write NULL or an
+ missing parameters will always take on default values. Write <symbol>NULL</symbol> or an
empty string for any one of the fixed parameters that is to be defaulted.
</para>
</listitem>
@@ -849,7 +849,7 @@ const char *PQparameterStatus(const PGconn *conn, const char *paramName);
Certain parameter values are reported by the server automatically at
connection startup or whenever their values change.
<function>PQparameterStatus</> can be used to interrogate these settings.
-It returns the current value of a parameter if known, or NULL if the parameter
+It returns the current value of a parameter if known, or <symbol>NULL</symbol> if the parameter
is not known.
</para>
@@ -890,7 +890,7 @@ or zero (connection bad). This will not change after connection
startup is complete, but it could theoretically change during a reset.
The 3.0 protocol will normally be used when communicating with
<productname>PostgreSQL</> 7.4 or later servers; pre-7.4 servers support
-only protocol 2.0. (Protocol 1.0 is obsolete and not supported by libpq.)
+only protocol 2.0. (Protocol 1.0 is obsolete and not supported by <application>libpq</application>.)
</para>
</listitem>
</varlistentry>
<parameter>nParams</> is the number of parameters supplied; it is the length
of the arrays <parameter>paramTypes[]</>, <parameter>paramValues[]</>,
<parameter>paramLengths[]</>, and <parameter>paramFormats[]</>. (The
-array pointers may be NULL when <parameter>nParams</> is zero.)
-<parameter>paramTypes[]</> specifies, by OID, the datatypes to be assigned to
-the parameter symbols. If <parameter>paramTypes</> is NULL, or any particular
-element in the array is zero, the backend assigns a datatype to the parameter
+array pointers may be <symbol>NULL</symbol> when <parameter>nParams</> is zero.)
+<parameter>paramTypes[]</> specifies, by OID, the datatypes to be assigned to
+the parameter symbols. If <parameter>paramTypes</> is <symbol>NULL</symbol>, or any particular
+element in the array is zero, the server assigns a data type to the parameter
symbol in the same way it would do for an untyped literal string.
<parameter>paramValues[]</> specifies the actual values of the parameters.
-A NULL pointer in this array means the corresponding parameter is NULL;
+A null pointer in this array means the corresponding parameter is null;
otherwise the pointer points to a zero-terminated text string (for text
-format) or binary data in the format expected by the backend (for binary
+format) or binary data in the format expected by the server (for binary
format).
<parameter>paramLengths[]</> specifies the actual data lengths of
-binary-format parameters. It is ignored for NULL parameters and text-format
-parameters. The array pointer may be NULL when there are no binary
+binary-format parameters. It is ignored for null parameters and text-format
+parameters. The array pointer may be null when there are no binary
parameters.
<parameter>paramFormats[]</> specifies whether parameters are text (put a zero
in the array) or binary (put a one in the array). If the array pointer is
-NULL then all parameters are presumed to be text.
+null then all parameters are presumed to be text.
<parameter>resultFormat</> is zero to obtain results in text format, or one to
obtain results in binary format. (There is not currently a provision to
obtain different result columns in different formats, although that is
</para>
<para>
-NULL is returned if the column number is out of range.
+<symbol>NULL</symbol> is returned if the column number is out of range.
</para>
</listitem>
</varlistentry>
For data in text format, the value returned by <function>PQgetvalue</function>
is a null-terminated character string representation
of the field value. For data in binary format, the value is in the binary
-representation determined by the datatype's <function>typsend</> and
+representation determined by the datatype's <function>typsend</> and
<function>typreceive</> functions. (The value is actually followed by
a zero byte in this case too, but that is not ordinarily useful, since
the value is likely to contain embedded nulls.)
</para>
<para>
-An empty string is returned if the field value is NULL. See
-<function>PQgetisnull</> to distinguish NULLs from empty-string values.
+An empty string is returned if the field value is null. See
+<function>PQgetisnull</> to distinguish null values from empty-string values.
</para>
<para>
<function>PQunescapeBytea</function>,
and <function>PQnotifies</function>.
It is needed by Win32, which can not free memory across
- DLL's, unless multithreaded DLL's (/MD in VC6) are used.
+ DLLs, unless multithreaded DLLs (<option>/MD</option> in VC6) are used.
On other platforms it is the same as <function>free()</>.
</para>
</listitem>
parameters to be passed to the function; they must match the declared
function argument list. When the <parameter>isint</> field of a
parameter
- struct is true,
+ structure is true,
the <parameter>u.integer</> value is sent to the server as an integer
of the indicated length (this must be 1, 2, or 4 bytes); proper
byte-swapping occurs. When <parameter>isint</> is false, the
indicated number of bytes at <parameter>*u.ptr</> are sent with no
processing; the data must be in the format expected by the server for
- binary transmission of the function's argument datatype.
+ binary transmission of the function's argument datatype.
<parameter>result_buf</parameter> is the buffer in which
to place the return value. The caller must have allocated
sufficient space to store the return value. (There is no check!)
@@ -2577,7 +2577,7 @@ caller is responsible for freeing the <structname>PGresult</structname> with
</para>
<para>
-Note that it is not possible to handle NULL arguments, NULL results, nor
+Note that it is not possible to handle null arguments, null results, nor
set-valued results when using this interface.
</para>
<note>
<para>
In <productname>PostgreSQL</productname> 6.4 and later,
- the <structfield>be_pid</structfield> is that of the notifying backend process,
- whereas in earlier versions it was always the <acronym>PID</acronym> of your own backend process.
+ the <structfield>be_pid</structfield> is that of the notifying server process,
+ whereas in earlier versions it was always the <acronym>PID</acronym> of your own server process.
</para>
</note>
@@ -2724,7 +2724,7 @@ if any notifications came in during the processing of the command.
<function>PQexec</function> in a string that could contain additional
commands, the application must continue fetching results via
<function>PQgetResult</> after completing the <command>COPY</command>
- sequence. Only when <function>PQgetResult</> returns NULL is it certain
+ sequence. Only when <function>PQgetResult</> returns <symbol>NULL</symbol> is it certain
that the <function>PQexec</function> command string is done and it is
safe to issue more commands.
</para>
Transmits the COPY data in the specified <parameter>buffer</>, of length
<parameter>nbytes</>, to the server. The result is 1 if the data was sent,
zero if it was not sent because the attempt would block (this case is only
-possible if the connection is in nonblock mode), or -1 if an error occurred.
+possible if the connection is in nonblocking mode), or -1 if an error occurred.
(Use <function>PQerrorMessage</function> to retrieve details if the return
value is -1. If the value is zero, wait for write-ready and try again.)
</para>
<para>
-The application may divide the COPY datastream into bufferloads of any
-convenient size. Bufferload boundaries have no semantic significance when
-sending. The contents of the datastream must match the data format expected
+The application may divide the <command>COPY</command> data stream into buffer loads of any
+convenient size. Buffer-load boundaries have no semantic significance when
+sending. The contents of the datastream must match the data format expected
by the <command>COPY</> command; see
<xref linkend="sql-copy" endterm="sql-copy-title"> for details.
</para>
<para>
Ends the <literal>COPY_IN</> operation successfully if <parameter>errormsg</>
-is NULL. If <parameter>errormsg</> is not NULL then the <command>COPY</>
+is <symbol>NULL</symbol>. If <parameter>errormsg</> is not <symbol>NULL</symbol> then the <command>COPY</>
is forced to fail, with the string pointed to by <parameter>errormsg</>
used as the error message. (One should not assume that this exact error
message will come back from the server, however, as the server might have
@@ -2855,7 +2855,7 @@ option to force failure does not work when using pre-3.0-protocol connections.)
<para>
The result is 1 if the termination data was sent,
zero if it was not sent because the attempt would block (this case is only
-possible if the connection is in nonblock mode), or -1 if an error occurred.
+possible if the connection is in nonblocking mode), or -1 if an error occurred.
(Use <function>PQerrorMessage</function> to retrieve details if the return
value is -1. If the value is zero, wait for write-ready and try again.)
</para>
@@ -2900,9 +2900,9 @@ Attempts to obtain another row of data from the server during a COPY.
Data is always returned one data row at a time; if only a partial row
is available, it is not returned. Successful return of a data row
involves allocating a chunk of memory to hold the data. The
-<parameter>buffer</> parameter must be non-NULL. <parameter>*buffer</>
-is set to point to the allocated memory, or to NULL in cases where no
-buffer is returned. A non-NULL result buffer must be freed using
+<parameter>buffer</> parameter must be non-<symbol>NULL</symbol>. <parameter>*buffer</>
+is set to point to the allocated memory, or to <symbol>NULL</symbol> in cases where no
+buffer is returned. A non-<symbol>NULL</symbol> result buffer must be freed using
<function>PQfreemem</> when no longer needed.
</para>
</para>
<para>
-The COPY datastream sent by a series of calls to
+The <command>COPY</command> data stream sent by a series of calls to
<function>PQputline</function> has the same format as that returned by
<function>PQgetlineAsync</function>, except that applications are not
obliged to send exactly one data row per <function>PQputline</function>
index 474cde427eb67bfc00a03086696e78572fd09eeb..4cdac668f0d01b95fef5a944456a048ad76836ad 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/lobj.sgml,v 1.30 2003年08月31日 17:32:19 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/lobj.sgml,v 1.31 2003年11月01日 01:56:29 petere Exp $
-->
<chapter id="largeObjects">
@@ -324,10 +324,10 @@ SELECT lo_export(image.raster, '/tmp/motd') FROM image
</para>
<para>
-These functions read and write files in the server's filesystem, using the
+These functions read and write files in the server's filesystem, using the
permissions of the database's owning user. Therefore, their use is restricted
to superusers. (In contrast, the client-side import and export functions
-read and write files in the client's filesystem, using the permissions of
+read and write files in the client's filesystem, using the permissions of
the client program. Their use is not restricted.)
</para>
</sect1>
index e9e17ea2f40011bbcb6c82604e6e979297b84925..6a42552b8f98f76eb5fe9c42e660744a04672408 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.26 2003年10月09日 19:05:09 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.27 2003年11月01日 01:56:29 petere Exp $
-->
<chapter id="maintenance">
@@ -101,13 +101,13 @@ $Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.26 2003年10月09日 19:05:09
<para>
In normal <productname>PostgreSQL</productname> operation, an
<command>UPDATE</> or <command>DELETE</> of a row does not
- immediately remove the old <firstterm>tuple</> (version of the row).
+ immediately remove the old version of the row.
This approach is necessary to gain the benefits of multiversion
- concurrency control (see <xref linkend="mvcc">): the tuple
+ concurrency control (see <xref linkend="mvcc">): the row version
must not be deleted while it is still potentially visible to other
- transactions. But eventually, an outdated or deleted tuple is no
+ transactions. But eventually, an outdated or deleted row version is no
longer of interest to any transaction. The space it occupies must be
- reclaimed for reuse by new tuples, to avoid infinite growth of disk
+ reclaimed for reuse by new rows, to avoid infinite growth of disk
space requirements. This is done by running <command>VACUUM</>.
</para>
@@ -125,7 +125,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.26 2003年10月09日 19:05:09
<para>
The standard form of <command>VACUUM</> is best used with the goal of
maintaining a fairly level steady-state usage of disk space. The standard
- form finds old tuples and makes their space available for re-use within
+ form finds old row versions and makes their space available for re-use within
the table, but it does not try very hard to shorten the table file and
return disk space to the operating system. If you need to return disk
space to the operating system you can use <command>VACUUM FULL</> ---
@@ -147,7 +147,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.26 2003年10月09日 19:05:09
<para>
<command>VACUUM FULL</> is recommended for cases where you know you have
- deleted the majority of tuples in a table, so that the steady-state size
+ deleted the majority of rows in a table, so that the steady-state size
of the table can be shrunk substantially with <command>VACUUM FULL</>'s
more aggressive approach.
</para>
@@ -242,7 +242,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.26 2003年10月09日 19:05:09
<para>
<productname>PostgreSQL</productname>'s MVCC transaction semantics
depend on being able to compare transaction ID (<acronym>XID</>)
- numbers: a tuple with an insertion XID greater than the current
+ numbers: a row version with an insertion XID greater than the current
transaction's XID is <quote>in the future</> and should not be visible
to the current transaction. But since transaction IDs have limited size
(32 bits at this writing) a cluster that runs for a long time (more
@@ -283,29 +283,29 @@ $Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.26 2003年10月09日 19:05:09
that for every normal XID, there are two billion XIDs that are
<quote>older</> and two billion that are <quote>newer</>; another
way to say it is that the normal XID space is circular with no
- endpoint. Therefore, once a tuple has been created with a particular
- normal XID, the tuple will appear to be <quote>in the past</> for
+ endpoint. Therefore, once a row version has been created with a particular
+ normal XID, the row version will appear to be <quote>in the past</> for
the next two billion transactions, no matter which normal XID we are
- talking about. If the tuple still exists after more than two billion
+ talking about. If the row version still exists after more than two billion
transactions, it will suddenly appear to be in the future. To
- prevent data loss, old tuples must be reassigned the XID
+ prevent data loss, old row versions must be reassigned the XID
<literal>FrozenXID</> sometime before they reach the
two-billion-transactions-old mark. Once they are assigned this
special XID, they will appear to be <quote>in the past</> to all
normal transactions regardless of wraparound issues, and so such
- tuples will be good until deleted, no matter how long that is. This
+ row versions will be good until deleted, no matter how long that is. This
reassignment of XID is handled by <command>VACUUM</>.
</para>
<para>
<command>VACUUM</>'s normal policy is to reassign <literal>FrozenXID</>
- to any tuple with a normal XID more than one billion transactions in the
+ to any row version with a normal XID more than one billion transactions in the
past. This policy preserves the original insertion XID until it is not
- likely to be of interest anymore. (In fact, most tuples will probably
+ likely to be of interest anymore. (In fact, most row versions will probably
live and die without ever being <quote>frozen</>.) With this policy,
the maximum safe interval between <command>VACUUM</> runs on any table
is exactly one billion transactions: if you wait longer, it's possible
- that a tuple that was not quite old enough to be reassigned last time
+ that a row version that was not quite old enough to be reassigned last time
is now more than two billion transactions old and has wrapped around
into the future --- i.e., is lost to you. (Of course, it'll reappear
after another two billion transactions, but that's no help.)
<para>
<command>VACUUM</> with the <command>FREEZE</> option uses a more
- aggressive freezing policy: tuples are frozen if they are old enough
+ aggressive freezing policy: row versions are frozen if they are old enough
to be considered good by all open transactions. In particular, if a
<command>VACUUM FREEZE</> is performed in an otherwise-idle
- database, it is guaranteed that <emphasis>all</> tuples in that
+ database, it is guaranteed that <emphasis>all</> row versions in that
database will be frozen. Hence, as long as the database is not
modified in any way, it will not need subsequent vacuuming to avoid
transaction ID wraparound problems. This technique is used by
<para>
The simplest production-grade approach to managing log output is to
- send it all to <application>syslog</> and let <application>syslog</>
- deal with file rotation. To do this, set the configurations parameter
- <literal>syslog</> to 2 (to log to <application>syslog</> only) in
- <filename>postgresql.conf</>. Then you can send a <literal>SIGHUP</literal>
- signal to the <application>syslog</> daemon whenever you want to force it
- to start writing a new log file. If you want to automate log rotation,
- the logrotate program can be configured to work with log files from syslog.
+ send it all to <application>syslog</> and let
+ <application>syslog</> deal with file rotation. To do this, set the
+ configurations parameter <literal>syslog</> to 2 (to log to
+ <application>syslog</> only) in <filename>postgresql.conf</>. Then
+ you can send a <literal>SIGHUP</literal> signal to the
+ <application>syslog</> daemon whenever you want to force it to
+ start writing a new log file. If you want to automate log
+ rotation, the <application>logrotate</application> program can be
+ configured to work with log files from
+ <application>syslog</application>.
</para>
index 1ea6101a80c18a469efaf56a2a4e915bebe6d29d..2ba07811ef0c102fa2e4c5e574dcb25dbbe6fc60 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/monitoring.sgml,v 1.22 2003年10月17日 22:38:20 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/monitoring.sgml,v 1.23 2003年11月01日 01:56:29 petere Exp $
-->
<chapter id="monitoring">
@@ -237,8 +237,8 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
<row>
<entry><structname>pg_stat_all_tables</></entry>
<entry>For each table in the current database, total numbers of
- sequential and index scans, total numbers of tuples returned by
- each type of scan, and totals of tuple insertions, updates,
+ sequential and index scans, total numbers of rows returned by
+ each type of scan, and totals of row insertions, updates,
and deletions.</entry>
</row>
@@ -257,9 +257,9 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
<row>
<entry><structname>pg_stat_all_indexes</></entry>
<entry>For each index in the current database, the total number
- of index scans that have used that index, the number of index tuples
- read, and the number of successfully fetched heap tuples. (This may
- be less when there are index entries pointing to expired heap tuples.)
+ of index scans that have used that index, the number of index rows
+ read, and the number of successfully fetched heap rows. (This may
+ be less when there are index entries pointing to expired heap rows.)
</entry>
</row>
@@ -441,8 +441,8 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
<entry><literal><function>pg_stat_get_tuples_returned</function>(<type>oid</type>)</literal></entry>
<entry><type>bigint</type></entry>
<entry>
- Number of tuples read by sequential scans when argument is a table,
- or number of index tuples read when argument is an index
+ Number of rows read by sequential scans when argument is a table,
+ or number of index rows read when argument is an index
</entry>
</row>
@@ -450,7 +450,7 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
<entry><literal><function>pg_stat_get_tuples_fetched</function>(<type>oid</type>)</literal></entry>
<entry><type>bigint</type></entry>
<entry>
- Number of valid (unexpired) table tuples fetched by sequential scans
+ Number of valid (unexpired) table rows fetched by sequential scans
when argument is a table, or fetched by index scans using this index
when argument is an index
</entry>
@@ -460,7 +460,7 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
<entry><literal><function>pg_stat_get_tuples_inserted</function>(<type>oid</type>)</literal></entry>
<entry><type>bigint</type></entry>
<entry>
- Number of tuples inserted into table
+ Number of rows inserted into table
</entry>
</row>
@@ -468,7 +468,7 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
<entry><literal><function>pg_stat_get_tuples_updated</function>(<type>oid</type>)</literal></entry>
<entry><type>bigint</type></entry>
<entry>
- Number of tuples updated in table
+ Number of rows updated in table
</entry>
</row>
@@ -476,7 +476,7 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
<entry><literal><function>pg_stat_get_tuples_deleted</function>(<type>oid</type>)</literal></entry>
<entry><type>bigint</type></entry>
<entry>
- Number of tuples deleted from table
+ Number of rows deleted from table
</entry>
</row>
index 634c82e90bc462c253d2c2aea49d14714eeffe3c..d857b66bb5cbee4960178734218df50c9fabbe73 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/nls.sgml,v 1.6 2003年05月19日 21:38:23 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/nls.sgml,v 1.7 2003年11月01日 01:56:29 petere Exp $
-->
<chapter id="nls">
@@ -35,7 +35,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/nls.sgml,v 1.6 2003年05月19日 21:38:23 tgl Exp
this is only in the unlikely event that you do not want to try out
your translated messages. When you configure your source tree, be
sure to use the <option>--enable-nls</option> option. This will
- also check for the libintl library and the
+ also check for the <application>libintl</application> library and the
<filename>msgfmt</filename> program, which all end users will need
anyway. To try out your work, follow the applicable portions of
the installation instructions.
@@ -49,7 +49,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/nls.sgml,v 1.6 2003年05月19日 21:38:23 tgl Exp
implementation. Later, we will try to arrange it so that if you
use a packaged source distribution, you won't need
<filename>xgettext</filename>. (From CVS, you will still need
- it.) GNU gettext 0.10.36 or later is currently recommended.
+ it.) <application>GNU Gettext 0.10.36</application> or later is currently recommended.
</para>
<para>
@@ -374,7 +374,7 @@ fprintf(stderr, gettext("panic level %d\n"), lvl);
<variablelist>
<varlistentry>
- <term>CATALOG_NAME</term>
+ <term><varname>CATALOG_NAME</varname></term>
<listitem>
<para>
@@ -385,7 +385,7 @@ fprintf(stderr, gettext("panic level %d\n"), lvl);
</varlistentry>
<varlistentry>
- <term>AVAIL_LANGUAGES</term>
+ <term><varname>AVAIL_LANGUAGES</varname></term>
<listitem>
<para>
@@ -395,7 +395,7 @@ fprintf(stderr, gettext("panic level %d\n"), lvl);
</varlistentry>
<varlistentry>
- <term>GETTEXT_FILES</term>
+ <term><varname>GETTEXT_FILES</varname></term>
<listitem>
<para>
@@ -411,7 +411,7 @@ fprintf(stderr, gettext("panic level %d\n"), lvl);
</varlistentry>
<varlistentry>
- <term>GETTEXT_TRIGGERS</term>
+ <term><varname>GETTEXT_TRIGGERS</varname></term>
<listitem>
<para>
index 6fea43df87fe2ae27d94b613b1b719495a14b17f..03c81f76babba313aec0bec0dff292c04f6baf8e 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/Attic/page.sgml,v 1.14 2003年09月29日 18:18:35 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/Attic/page.sgml,v 1.15 2003年11月01日 01:56:29 petere Exp $
-->
<chapter id="page">
is assumed to contain 8 bits. In addition, the term
<firstterm>item</firstterm>
refers to an individual data value that is stored on a page. In a table,
-an item is a tuple (row); in an index, an item is an index entry.
+an item is a row; in an index, an item is an index entry.
</para>
<para>
<row>
<entry>Free space</entry>
-<entry>The unallocated space. All new tuples are allocated from here, generally from the end.</entry>
+<entry>The unallocated space. All new rows are allocated from here, generally from the end.</entry>
</row>
<row>
and a version indicator. Beginning with
<productname>PostgreSQL</productname> 7.3 the version number is 1; prior
releases used version number 0. (The basic page layout and header format
- has not changed, but the layout of heap tuple headers has.) The page size
+ has not changed, but the layout of heap row headers has.) The page size
is basically only present as a cross-check; there is no support for having
more than one page size in an installation.
</para>
<para>
- All table tuples are structured the same way. There is a fixed-size
+ All table rows are structured the same way. There is a fixed-size
header (occupying 23 bytes on most machines), followed by an optional null
bitmap, an optional object ID field, and the user data. The header is
detailed
in <xref linkend="heaptupleheaderdata-table">. The actual user data
- (fields of the tuple) begins at the offset indicated by
+ (columns of the row) begins at the offset indicated by
<structfield>t_hoff</>, which must always be a multiple of the MAXALIGN
distance for the platform.
The null bitmap is
<entry>t_xvac</entry>
<entry>TransactionId</entry>
<entry>4 bytes</entry>
- <entry>XID for VACUUM operation moving tuple</entry>
+ <entry>XID for VACUUM operation moving row version</entry>
</row>
<row>
<entry>t_ctid</entry>
<entry>ItemPointerData</entry>
<entry>6 bytes</entry>
- <entry>current TID of this or newer tuple</entry>
+ <entry>current TID of this or newer row version</entry>
</row>
<row>
<entry>t_natts</entry>
index d04f5ce89d368a6f29e989b03587d15834a1c1f9..eaeb6c59607893577288a39e8fcba6339ea7cec3 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/perform.sgml,v 1.36 2003年10月17日 22:38:20 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/perform.sgml,v 1.37 2003年11月01日 01:56:29 petere Exp $
-->
<chapter id="performance-tips">
@@ -614,7 +614,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse;
<varname>from_collapse_limit</> (so that explicit joins and subselects
act similarly) or set <varname>join_collapse_limit</> to 1 (if you want
to control join order with explicit joins). But you might set them
- differently if you are trying to fine-tune the tradeoff between planning
+ differently if you are trying to fine-tune the tradeoff between planning
time and run time.
</para>
</sect1>
index 8db8029cf9d41290a507d99c632ed21e6c5bd0ab..3ea9461452089906859fd2fe19618c2c89add558 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/plpgsql.sgml,v 1.27 2003年09月23日 19:58:50 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/plpgsql.sgml,v 1.28 2003年11月01日 01:56:29 petere Exp $
-->
<chapter id="plpgsql">
</sect2>
<sect2 id="plpgsql-args-results">
- <title>Supported Argument and Result Datatypes</title>
+ <title>Supported Argument and Result Data Types</title>
<para>
Functions written in <application>PL/pgSQL</application> can accept
- as arguments any scalar or array datatype supported by the server,
+ as arguments any scalar or array datatype supported by the server,
and they can return a result of any of these types. They can also
accept or return any composite type (row type) specified by name.
It is also possible to declare a <application>PL/pgSQL</application>
<application>PL/pgSQL</> functions may also be declared to accept
and return the <quote>polymorphic</> types
<type>anyelement</type> and <type>anyarray</type>. The actual
- datatypes handled by a polymorphic function can vary from call to
+ datatypes handled by a polymorphic function can vary from call to
call, as discussed in <xref linkend="extend-types-polymorphic">.
An example is shown in <xref linkend="plpgsql-declaration-aliases">.
</para>
<para>
<application>PL/pgSQL</> functions can also be declared to return
- a <quote>set</>, or table, of any datatype they can return a single
+ a <quote>set</>, or table, of any datatype they can return a single
instance of. Such a function generates its output by executing
<literal>RETURN NEXT</> for each desired element of the result set.
</para>
When the return type of a <application>PL/pgSQL</application>
function is declared as a polymorphic type (<type>anyelement</type>
or <type>anyarray</type>), a special parameter <literal>0ドル</literal>
- is created. Its datatype is the actual return type of the function,
+ is created. Its datatype is the actual return type of the function,
as deduced from the actual input types (see <xref
linkend="extend-types-polymorphic">).
This allows the function to access its actual return type
<literal>0ドル</literal> is initialized to NULL and can be modified by
the function, so it can be used to hold the return value if desired,
though that is not required. <literal>0ドル</literal> can also be
- given an alias. For example, this function works on any datatype
+ given an alias. For example, this function works on any datatype
that has a <literal>+</> operator:
<programlisting>
CREATE FUNCTION add_three_values(anyelement, anyelement, anyelement)
index e3f7af31412d066a945ecba432c4a0cd610525c4..54983bdb74ef29e990c75eee9a435b18fac20c67 100644 (file)
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/protocol.sgml,v 1.46 2003年10月17日 18:57:01 tgl Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/protocol.sgml,v 1.47 2003年11月01日 01:56:29 petere Exp $ -->
<chapter id="protocol">
<title>Frontend/Backend Protocol</title>
<title>Formats and Format Codes</title>
<para>
- Data of a particular datatype might be transmitted in any of several
+ Data of a particular datatype might be transmitted in any of several
different <firstterm>formats</>. As of <productname>PostgreSQL</> 7.4
the only supported formats are <quote>text</> and <quote>binary</>,
but the protocol makes provision for future extensions. The desired
<para>
The text representation of values is whatever strings are produced
and accepted by the input/output conversion functions for the
- particular datatype. In the transmitted representation, there is
+ particular datatype. In the transmitted representation, there is
no trailing null character; the frontend must add one to received
values if it wants to process them as C strings.
(The text format does not allow embedded nulls, by the way.)
<para>
Binary representations for integers use network byte order (most
- significant byte first). For other datatypes consult the documentation
+ significant byte first). For other datatypes consult the documentation
or source code to learn about the binary representation. Keep in mind
- that binary representations for complex datatypes may change across
+ that binary representations for complex datatypes may change across
server versions; the text format is usually the more portable choice.
</para>
</sect2>
<Para>
The response to a <command>SELECT</> query (or other queries that
- return rowsets, such as <command>EXPLAIN</> or <command>SHOW</>)
+ return rowsets, such as <command>EXPLAIN</> or <command>SHOW</>)
normally consists of RowDescription, zero or more
DataRow messages, and then CommandComplete.
<command>COPY</> to or from the frontend invokes special protocol
<para>
In the extended protocol, the frontend first sends a Parse message,
which contains a textual query string, optionally some information
- about datatypes of parameter placeholders, and the
+ about datatypes of parameter placeholders, and the
name of a destination prepared-statement object (an empty string
selects the unnamed prepared statement). The response is
- either ParseComplete or ErrorResponse. Parameter datatypes may be
+ either ParseComplete or ErrorResponse. Parameter datatypes may be
specified by OID; if not given, the parser attempts to infer the
- datatypes in the same way as it would do for untyped literal string
+ datatypes in the same way as it would do for untyped literal string
constants.
</para>
unnamed portal) and
a maximum result-row count (zero meaning <quote>fetch all rows</>).
The result-row count is only meaningful for portals
- containing commands that return rowsets; in other cases the command is
+ containing commands that return rowsets; in other cases the command is
always executed to completion, and the row count is ignored.
The possible
responses to Execute are the same as those described above for queries
<command>SET</> SQL command executed by the frontend, and this case
is effectively synchronous --- but it is also possible for parameter
status changes to occur because the administrator changed a configuration
- file and then SIGHUP'd the postmaster. Also, if a SET command is
+ file and then sent the <systemitem>SIGHUP</systemitem> signal to the postmaster. Also, if a SET command is
rolled back, an appropriate ParameterStatus message will be generated
to report the current effective value.
</para>
</Term>
<ListItem>
<Para>
- Specifies that a cleartext password is required.
+ Specifies that a clear-text password is required.
</Para>
</ListItem>
</VarListEntry>
</Term>
<ListItem>
<Para>
- Data that forms part of a COPY datastream. Messages sent
+ Data that forms part of a <command>COPY</command> data stream. Messages sent
from the backend will always correspond to single data rows,
- but messages sent by frontends may divide the datastream
+ but messages sent by frontends may divide the datastream
arbitrarily.
</Para>
</ListItem>
</Term>
<ListItem>
<Para>
- Specifies the object ID of the parameter datatype.
+ Specifies the object ID of the parameter datatype.
</Para>
</ListItem>
</VarListEntry>
</Term>
<ListItem>
<Para>
- The number of parameter datatypes specified
+ The number of parameter datatypes specified
(may be zero). Note that this is not an indication of
the number of parameters that might appear in the
query string, only the number that the frontend wants to
</Term>
<ListItem>
<Para>
- Specifies the object ID of the parameter datatype.
+ Specifies the object ID of the parameter datatype.
Placing a zero here is equivalent to leaving the type
unspecified.
</Para>
</Term>
<ListItem>
<Para>
- The object ID of the field's datatype.
+ The object ID of the field's datatype.
</Para>
</ListItem>
</VarListEntry>
</Term>
<ListItem>
<Para>
- The datatype size (see <varname>pg_type.typlen</>).
+ The datatype size (see <varname>pg_type.typlen</>).
Note that negative values denote variable-width types.
</Para>
</ListItem>
index 2528154288c6af0fe6e96a9137a7654a4eb4b05b..276bfd6323423e45964eedfd908da505668c5897 100644 (file)
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/queries.sgml,v 1.24 2003年09月12日 22:17:23 tgl Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/queries.sgml,v 1.25 2003年11月01日 01:56:29 petere Exp $ -->
<chapter id="queries">
<title>Queries</title>
@@ -132,7 +132,7 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r
When a table reference names a table that is the supertable of a
table inheritance hierarchy, the table reference produces rows of
not only that table but all of its subtable successors, unless the
- keyword <literal>ONLY</> precedes the table name. However, the
+ keyword <literal>ONLY</> precedes the table name. However, the
reference produces only the columns that appear in the named table
--- any columns added in subtables are ignored.
</para>
determined with the <literal>></literal> operator.
<footnote>
<para>
- Actually, <productname>PostgreSQL</> uses the <firstterm>default btree
- operator class</> for the column's datatype to determine the sort
+ Actually, <productname>PostgreSQL</> uses the <firstterm>default B-tree
+ operator class</> for the column's datatype to determine the sort
ordering for <literal>ASC</> and <literal>DESC</>. Conventionally,
- datatypes will be set up so that the <literal><</literal> and
+ datatypes will be set up so that the <literal><</literal> and
<literal>></literal> operators correspond to this sort ordering,
- but a user-defined datatype's designer could choose to do something
+ but a user-defined datatype's designer could choose to do something
different.
</para>
</footnote>
index 26ffb06bd730349e86f53ee9ccb5530c4c7e708b..abea586bf019ef81e723fe98210e0ba993e4aa22 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/query.sgml,v 1.33 2003年08月31日 17:32:19 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/query.sgml,v 1.34 2003年11月01日 01:56:29 petere Exp $
-->
<chapter id="tutorial-sql">
and a rich set of geometric types.
<productname>PostgreSQL</productname> can be customized with an
arbitrary number of user-defined data types. Consequently, type
- names are not syntactical keywords, except where required to
+ names are not syntactical keywords, except where required to
support special cases in the <acronym>SQL</acronym> standard.
</para>
index 421ad0fc0ddddac5c7c212ae80901024040d6328..ecfa057d8612b6a98c2c7db21340bd78c2dc52ab 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_sequence.sgml,v 1.5 2003年09月22日 00:16:57 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_sequence.sgml,v 1.6 2003年11月01日 01:56:29 petere Exp $
PostgreSQL documentation
-->
@@ -49,7 +49,7 @@ ALTER SEQUENCE <replaceable class="parameter">name</replaceable> [ INCREMENT [ B
<term><replaceable class="parameter">name</replaceable></term>
<listitem>
<para>
- The name (optionally schema-qualified) of a sequence to be altered.
+ The name (optionally schema-qualified) of a sequence to be altered.
</para>
</listitem>
</varlistentry>
@@ -58,42 +58,43 @@ ALTER SEQUENCE <replaceable class="parameter">name</replaceable> [ INCREMENT [ B
<term><replaceable class="parameter">increment</replaceable></term>
<listitem>
<para>
- The
- <option>INCREMENT BY <replaceable class="parameter">increment</replaceable></option>
- clause is optional. A positive value will make an
- ascending sequence, a negative one a descending sequence.
- If unspecified, the old increment value will be maintained.
+ The clause <literal>INCREMENT BY <replaceable
+ class="parameter">increment</replaceable></literal> is
+ optional. A positive value will make an ascending sequence, a
+ negative one a descending sequence. If unspecified, the old
+ increment value will be maintained.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="parameter">minvalue</replaceable></term>
- <term>NO MINVALUE</term>
+ <term><literal>NO MINVALUE</literal></term>
<listitem>
<para>
- The optional clause <option>MINVALUE
- <replaceable class="parameter">minvalue</replaceable></option>
- determines the minimum value
- a sequence can generate. If <option>NO MINVALUE</option> is specified,
- the defaults of 1 and -2^63-1 for ascending and descending sequences, respectively, will be used. If neither option is specified, the current minimum
- value will be maintained.
+ The optional clause <literal>MINVALUE <replaceable
+ class="parameter">minvalue</replaceable></literal> determines
+ the minimum value a sequence can generate. If <literal>NO
+ MINVALUE</literal> is specified, the defaults of 1 and
+ -2<superscript>63</>-1 for ascending and descending sequences,
+ respectively, will be used. If neither option is specified,
+ the current minimum value will be maintained.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="parameter">maxvalue</replaceable></term>
- <term>NO MAXVALUE</term>
+ <term><literal>NO MAXVALUE</literal></term>
<listitem>
<para>
- The optional clause <option>MAXVALUE
- <replaceable class="parameter">maxvalue</replaceable></option>
- determines the maximum value for the sequence. If
- <option>NO MAXVALUE</option> is specified, the defaults are 2^63-1 and -1 for
- ascending and descending sequences, respectively, will be used. If
- neither option is specified, the current maximum value will be
- maintained.
+ The optional clause <literal>MAXVALUE <replaceable
+ class="parameter">maxvalue</replaceable></literal> determines
+ the maximum value for the sequence. If <literal>NO
+ MAXVALUE</literal> is specified, the defaults are
+ 2<superscript>63</>-1 and -1 for ascending and descending
+ sequences, respectively, will be used. If neither option is
+ specified, the current maximum value will be maintained.
</para>
</listitem>
</varlistentry>
@@ -102,9 +103,9 @@ ALTER SEQUENCE <replaceable class="parameter">name</replaceable> [ INCREMENT [ B
<term><replaceable class="parameter">start</replaceable></term>
<listitem>
<para>
- The optional <option>RESTART WITH
- <replaceable class="parameter">start</replaceable></option>
- clause changes the current value of the sequence.
+ The optional clause <literal>RESTART WITH <replaceable
+ class="parameter">start</replaceable></literal> changes the
+ current value of the sequence.
</para>
</listitem>
</varlistentry>
@@ -113,11 +114,12 @@ ALTER SEQUENCE <replaceable class="parameter">name</replaceable> [ INCREMENT [ B
<term><replaceable class="parameter">cache</replaceable></term>
<listitem>
<para>
- 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).
- If unspecified, the old cache value will be maintained.
+ The clause <literal>CACHE <replaceable
+ class="parameter">cache</replaceable></literal> 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). If unspecified, the old
+ cache value will be maintained.
</para>
</listitem>
</varlistentry>
@@ -126,32 +128,33 @@ ALTER SEQUENCE <replaceable class="parameter">name</replaceable> [ INCREMENT [ B
<term>CYCLE</term>
<listitem>
<para>
- The optional <option>CYCLE</option> keyword may be used to enable
- the sequence to wrap around when the
- <replaceable class="parameter">maxvalue</replaceable> or
- <replaceable class="parameter">minvalue</replaceable> has been
- reached by
- an ascending or descending sequence respectively. If the limit is
- reached, the next number generated will be the
- <replaceable class="parameter">minvalue</replaceable> or
- <replaceable class="parameter">maxvalue</replaceable>,
- respectively.
+ The optional <literal>CYCLE</literal> key word may be used to enable
+ the sequence to wrap around when the
+ <replaceable class="parameter">maxvalue</replaceable> or
+ <replaceable class="parameter">minvalue</replaceable> has been
+ reached by
+ an ascending or descending sequence respectively. If the limit is
+ reached, the next number generated will be the
+ <replaceable class="parameter">minvalue</replaceable> or
+ <replaceable class="parameter">maxvalue</replaceable>,
+ respectively.
</para>
</listitem>
</varlistentry>
- <varlistentry>
- <term>NO CYCLE</term>
- <listitem>
- <para>
- If the optional <option>NO CYCLE</option> keyword is specified, any
- calls to <function>nextval</function> after the sequence has reached
- its maximum value will return an error. If neither
- <option>CYCLE</option> or <option>NO CYCLE</option> are specified,
- the old cycle behaviour will be maintained.
- </para>
- </listitem>
- </varlistentry>
+ <varlistentry>
+ <term>NO CYCLE</term>
+ <listitem>
+ <para>
+ If the optional <literal>NO CYCLE</literal> key word is
+ specified, any calls to <function>nextval</function> after the
+ sequence has reached its maximum value will return an error.
+ If neither <literal>CYCLE</literal> or <literal>NO
+ CYCLE</literal> are specified, the old cycle behaviour will be
+ maintained.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</para>
</refsect1>
@@ -161,10 +164,10 @@ ALTER SEQUENCE <replaceable class="parameter">name</replaceable> [ INCREMENT [ B
<para>
Restart a sequence called <literal>serial</literal>, at 105:
- </para>
- <programlisting>
+<programlisting>
ALTER SEQUENCE serial RESTART WITH 105;
- </programlisting>
+</programlisting>
+ </para>
</refsect1>
<refsect1>
index b558731137a94c43f5f5d45cc6eb266c0c6c915d..099f0263f68d3ce6dbd7c3fef5fcff781f4775ca 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table.sgml,v 1.72 2003年09月09日 18:28:52 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table.sgml,v 1.73 2003年11月01日 01:56:29 petere Exp $
PostgreSQL documentation
-->
@@ -182,8 +182,8 @@ and <replaceable class="PARAMETER">table_constraint</replaceable> is:
<listitem>
<para>
The <literal>LIKE</literal> clause specifies a table from which
- the new table automatically inherits all column names, their datatypes, and
- <literal>NOT NULL</literal> constraints.
+ the new table automatically inherits all column names, their datatypes, and
+ not-null constraints.
</para>
<para>
Unlike <literal>INHERITS</literal>, the new table and inherited table
index 00a158ce51dc4ce47fc25127b238269331010e65..da670a182b40b13e76cc4f176ed1b0b21da745eb 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_type.sgml,v 1.46 2003年09月22日 00:16:57 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_type.sgml,v 1.47 2003年11月01日 01:56:29 petere Exp $
PostgreSQL documentation
-->
@@ -116,7 +116,7 @@ CREATE TYPE <replaceable class="parameter">name</replaceable> (
representation. If this function is not supplied, the type cannot
participate in binary input. The binary representation should be
chosen to be cheap to convert to internal form, while being reasonably
- portable. (For example, the standard integer datatypes use network
+ portable. (For example, the standard integer datatypes use network
byte order as the external binary representation, while the internal
representation is in the machine's native byte order.) The receive
function should perform adequate checking to ensure that the value is
@@ -124,7 +124,7 @@ CREATE TYPE <replaceable class="parameter">name</replaceable> (
The receive function may be declared as taking one argument of type
<type>internal</type>, or two arguments of types <type>internal</type>
and <type>oid</type>. It must return a value of the data type itself.
- (The first argument is a pointer to a StringInfo buffer
+ (The first argument is a pointer to a <type>StringInfo</type> buffer
holding the received byte string; the optional second argument is the
element type in case this is an array type.) Similarly, the optional
<replaceable class="parameter">send_function</replaceable> converts
index c8cb21ab1543203df2c6f1b3705ce5e4253cba63..1027413cf2a40bcca50625dfe51b3d5c1157d5e2 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_view.sgml,v 1.26 2003年09月28日 01:19:33 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_view.sgml,v 1.27 2003年11月01日 01:56:29 petere Exp $
PostgreSQL documentation
-->
@@ -30,7 +30,7 @@ class="PARAMETER">column_name</replaceable> [, ...] ) ] AS <replaceable class="P
<para>
<command>CREATE VIEW</command> defines a view of a query. The view
- is not physically materialized. Instead, the query is run everytime
+ is not physically materialized. Instead, the query is run everytime
the view is referenced in a query.
</para>
@@ -112,7 +112,7 @@ class="PARAMETER">column_name</replaceable> [, ...] ) ] AS <replaceable class="P
CREATE VIEW vista AS SELECT 'Hello World';
</programlisting>
is bad form in two ways: the column name defaults to <literal>?column?</>,
- and the column datatype defaults to <type>unknown</>. If you want a
+ and the column datatype defaults to <type>unknown</>. If you want a
string literal in a view's result, use something like
<programlisting>
CREATE VIEW vista AS SELECT text 'Hello World' AS hello;
index ec6c27d82ccf7e7fa80c222616e35b4b3497bcaa..4bc2172f3f5ee1f777c9989578652cb9eb8eb6de 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_ctl-ref.sgml,v 1.23 2003年08月31日 17:32:23 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_ctl-ref.sgml,v 1.24 2003年11月01日 01:56:29 petere Exp $
PostgreSQL documentation
-->
shutdown is indicated by removal of the <acronym>PID</acronym>
file. For starting up, a successful <command>psql -l</command>
indicates success. <command>pg_ctl</command> will attempt to
- use the proper port for psql. If the environment variable
- PGPORT exists, that is used. Otherwise, it will see if a port
+ use the proper port for <application>psql</>. If the environment variable
+ <envar>PGPORT</envar> exists, that is used. Otherwise, it will see if a port
has been set in the <filename>postgresql.conf</filename> file.
If neither of those is used, it will use the default port that
<productname>PostgreSQL</productname> was compiled with
index af8c2c5fc3466862b90491a1827eb18861de8f87..bc791380daeb5d8f82e861494b8ff5d33f2f6ff1 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.98 2003年10月04日 01:04:46 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.99 2003年11月01日 01:56:29 petere Exp $
PostgreSQL documentation
-->
processed in a single transaction, unless there are explicit
BEGIN/COMMIT commands included in the string to divide it into
multiple transactions. This is different from the behavior when
- the same string is fed to psql's standard input.
+ the same string is fed to <application>psql</application>'s standard input.
</para>
</listitem>
</varlistentry>
index f2b4c2c37cb7d1691488cd594c538818bb40df56..9444f5f6e6e3a22b737587fa83cd5096b4adda7e 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/select.sgml,v 1.70 2003年09月11日 21:42:20 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/select.sgml,v 1.71 2003年11月01日 01:56:29 petere Exp $
PostgreSQL documentation
-->
@@ -666,7 +666,7 @@ SELECT name FROM distributors ORDER BY code;
name may be specified in the <literal>USING</> clause.
<literal>ASC</> is usually equivalent to <literal>USING <</> and
<literal>DESC</> is usually equivalent to <literal>USING ></>.
- (But the creator of a user-defined datatype can define exactly what the
+ (But the creator of a user-defined datatype can define exactly what the
default sort ordering is, and it might correspond to operators with other
names.)
</para>
index b28b5d958017c25709aaf4acb82b56b95a78c89e..88523c1287df8de09516ba644f8d80e3fff5d5a6 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.234 2003年10月31日 22:22:10 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.235 2003年11月01日 01:56:29 petere Exp $
-->
<appendix id="release">
@@ -181,7 +181,7 @@ required for those wishing to migrate data from any previous release.</para>
<listitem><para> MOVE/FETCH now returns the actual number of rows moved/fetched, or zero
if at the beginning/end of the cursor</para>
<para>
- Prior releases would return the tuple count passed to the
+ Prior releases would return the row count passed to the
command, not the actual number of rows FETCHed or MOVEd.
</para>
</listitem>
<listitem><para>Disable LIMIT #,# syntax; now only LIMIT # OFFSET # supported (Bruce)</para></listitem>
<listitem><para>Increase identifier length to 63 (Neil, Bruce)</para></listitem>
<listitem><para>UNION fixes for merging >= 3 columns of different lengths (Tom)</para></listitem>
-<listitem><para>Add DEFAULT keyword to INSERT, e.g., INSERT ... (..., DEFAULT, ...) (Rod)</para></listitem>
+<listitem><para>Add DEFAULT keyword to INSERT, e.g., INSERT ... (..., DEFAULT, ...) (Rod)</para></listitem>
<listitem><para>Allow views to have default values using ALTER COLUMN ... SET DEFAULT (Neil)</para></listitem>
<listitem><para>Fail on INSERTs with column lists that don't supply all column values, e.g., INSERT INTO tab (col1, col2) VALUES ('val1'); (Rod)</para></listitem>
<listitem><para>Fix for join aliases (Tom)</para></listitem>
Multibytes fixes (Tom)
Unicode fixes (Tatsuo)
Optimizer improvements (Tom)
-Fix for whole tuples in functions (Tom)
+Fix for whole rows in functions (Tom)
Fix for pg_ctl and option strings with spaces (Peter E)
ODBC fixes (Hiroshi)
EXTRACT can now take string argument (Thomas)
@@ -2890,7 +2890,7 @@ Modify pg_dump to better handle user-defined items in template1 (Philip)
Allow LIMIT in VIEW (Tom)
Require cursor FETCH to honor LIMIT (Tom)
Allow PRIMARY/FOREIGN Key definitions on inherited columns (Stephan)
-Allow ORDER BY, LIMIT in sub-selects (Tom)
+Allow ORDER BY, LIMIT in subqueries (Tom)
Allow UNION in CREATE RULE (Tom)
Make ALTER/DROP TABLE rollback-able (Vadim, Tom)
Store initdb collation in pg_control so collation cannot be changed (Tom)
@@ -2923,7 +2923,7 @@ Improved handling of file descriptor cache (Tom)
New warning code about auto-created table alias entries (Bruce)
Overhaul initdb process (Tom, Peter E)
Overhaul of inherited tables; inherited tables now accessed by default;
- new ONLY keyword prevents it (Chris Bitmead, Tom)
+ new ONLY keyword prevents it (Chris Bitmead, Tom)
ODBC cleanups/improvements (Nick Gorham, Stephan Szabo, Zoltan Kovacs,
Michael Fork)
Allow renaming of temp tables (Tom)
pg_dumpall uses CREATE USER or CREATE GROUP rather using COPY (Peter E)
Overhaul pg_dump (Philip Warner)
Allow pg_hba.conf secondary password file to specify only username (Peter E)
-Allow TEMPORARY or TEMP keyword when creating temporary tables (Bruce)
+Allow TEMPORARY or TEMP keyword when creating temporary tables (Bruce)
New memory leak checker (Karel)
New SET SESSION CHARACTERISTICS (Thomas)
Allow nested block comments (Thomas)
Fix TRUNCATE failure on relations with indexes (Tom)
Avoid database-wide restart on write error (Hiroshi)
Fix nodeMaterial to honor chgParam by recomputing its output (Tom)
-Fix VACUUM problem with moving chain of update tuples when source and
- destination of a tuple lie on the same page (Tom)
+Fix VACUUM problem with moving chain of update row versions when source
+ and destination of a row version lie on the same page (Tom)
Fix user.c CommandCounterIncrement (Tom)
Fix for AM/PM boundary problem in to_char() (Karel Zak)
Fix TIME aggregate handling (Tom)
@@ -3538,7 +3538,7 @@ Add btree indexing of boolean values, >= and <= (Don Baccus)
Print current line number when COPY FROM fails (Massimo)
Recognize POSIX time zone e.g. "PST+8" and "GMT-8" (Thomas)
Add DEC as synonym for DECIMAL (Thomas)
-Add SESSION_USER as SQL92 keyword, same as CURRENT_USER (Thomas)
+Add SESSION_USER as SQL92 keyword, same as CURRENT_USER (Thomas)
Implement SQL92 column aliases (aka correlation names) (Thomas)
Implement SQL92 join syntax (Thomas)
Make INTERVAL reserved word allowed as a column identifier (Thomas)
New expresssion subtree code(Tom)
Avoid disk writes for read-only transactions(Vadim)
Fix for removal of temp tables if last transaction was aborted(Bruce)
-Fix to prevent too large tuple from being created(Bruce)
+Fix to prevent too large row from being created(Bruce)
plpgsql fixes
Allow port numbers 32k - 64k(Bruce)
Add ^ precidence(Bruce)
Port to NetBSD/sun3(Mr. Mutsuki Nakajima)
Port to NetBSD/macppc(Toshimi Aoki)
Fix for tcl/tk configuration(Vince)
-Removed CURRENT keyword for rule queries(Jan)
+Removed CURRENT keyword for rule queries(Jan)
NT dynamic loading now works(Daniel Horak)
Add ARM32 support(Andrew McMurry)
Better support for HP-UX 11 and UnixWare
@@ -4589,7 +4589,7 @@ New INSERT INTO TABLE DEFAULT VALUES statement available(Thomas)
New DECLARE and FETCH feature(Thomas)
libpq's internal structures now not exported(Tom)
Allow up to 8 key indexes(Bruce)
-Remove ARCHIVE keyword, that is no longer used(Thomas)
+Remove ARCHIVE keyword, that is no longer used(Thomas)
pg_dump -n flag to supress quotes around indentifiers
disable system columns for views(Jan)
new INET and CIDR types for network addresses(TomH, Paul)
Prevent \do from wrapping(Bruce)
Remove duplicate Russian character set entries
Sunos4 cleanup
-Allow optional TABLE keyword in LOCK and SELECT INTO(Thomas)
+Allow optional TABLE keyword in LOCK and SELECT INTO(Thomas)
CREATE SEQUENCE options to allow a negative integer(Thomas)
Add "PASSWORD" as an allowed column identifier(Thomas)
Add checks for UNION target fields(Bruce)
Enhancements
------------
-Subselects with EXISTS, IN, ALL, ANY keywords (Vadim, Bruce, Thomas)
+Subselects with EXISTS, IN, ALL, ANY keywords (Vadim, Bruce, Thomas)
New User Manual(Thomas, others)
Speedup by inlining some frequently-called functions
Real deadlock detection, no more timeouts(Bruce)
@@ -5089,7 +5089,7 @@ Bring in the PostODBC source tree as part of our standard distribution(Marc)
A minor patch for HP/UX 10 vs 9(Stan)
New pg_attribute.atttypmod for type-specific info like varchar length(Bruce)
UnixWare patches(Billy)
-New i386 'lock' for spinlock asm(Billy)
+New i386 'lock' for spinlock asm(Billy)
Support for multiplexed backends is removed
Start an OpenBSD port
Start an AUX port
@@ -5234,13 +5234,13 @@ Check for geometric intersections at endpoints to avoid rounding ugliness(Thomas
Catch non-functional delete attempts(Vadim)
Change time function names to be more consistent(Michael Reifenberg)
Check for zero divides(Michael Reifenberg)
-Fix very old bug which made tuples changed/inserted by a commnd
+Fix very old bug which made rows changed/inserted by a command
visible to the command itself (so we had multiple update of
- updated tuples, etc)(Vadim)
+ updated rows, etc.)(Vadim)
Fix for SELECT null, 'fail' FROM pg_am (Patrick)
SELECT NULL as EMPTY_FIELD now allowed(Patrick)
Remove un-needed signal stuff from contrib/pginterface
-Fix OR (where x != 1 or x isnull didn't return tuples with x NULL) (Vadim)
+Fix OR (where x != 1 or x isnull didn't return rows with x NULL) (Vadim)
Fix time_cmp function (Vadim)
Fix handling of functions with non-attribute first argument in
WHERE clauses (Vadim)
@@ -5254,7 +5254,7 @@ Default genetic optimizer GEQO parameter is now 8(Bruce)
Allow use parameters in target list having aggregates in functions(Vadim)
Added JDBC driver as an interface(Adrian & Peter)
pg_password utility
-Return number of tuples inserted/affected by INSERT/UPDATE/DELETE etc.(Vadim)
+Return number of rows inserted/affected by INSERT/UPDATE/DELETE etc.(Vadim)
Triggers implemented with CREATE TRIGGER (SQL3)(Vadim)
SPI (Server Programming Interface) allows execution of queries inside
C-functions (Vadim)
@@ -5481,7 +5481,7 @@ fix local buffers leak in transaction aborts (Vadim)
fix file manager memmory leaks, cleanups (Vadim, Massimo)
fix storage manager memmory leaks (Vadim)
fix btree duplicates handling (Vadim)
-fix deleted tuples re-incarnation caused by vacuum (Vadim)
+fix deleted rows reincarnation caused by vacuum (Vadim)
fix SELECT varchar()/char() INTO TABLE made zero-length fields(Bruce)
many psql, pg_dump, and libpq memory leaks fixed using Purify (Igor)
* added PQdisplayTuples() to libpq and changed monitor and psql to use it
* added NeXT port (requires SysVIPC implementation)
* added CAST .. AS ... syntax
- * added ASC and DESC keywords
+ * added ASC and DESC keywords
* added 'internal' as a possible language for CREATE FUNCTION
internal functions are C functions which have been statically linked
into the postgres backend.
Incompatibilities:
* date formats have to be MM-DD-YYYY (or DD-MM-YYYY if you're using
EUROPEAN STYLE). This follows SQL-92 specs.
- * "delimiters" is now a keyword
+ * "delimiters" is now a keyword
Enhancements:
* sql LIKE syntax has been added
(Also, aggregates can now be overloaded, i.e. you can define your
own MAX aggregate to take in a user-defined type.)
* CHANGE ACL removed. GRANT/REVOKE syntax added.
- - Privileges can be given to a group using the "GROUP" keyword.
+ - Privileges can be given to a group using the "GROUP" keyword.
For example:
GRANT SELECT ON foobar TO GROUP my_group;
- The keyword 'PUBLIC' is also supported to mean all users.
+ The key word 'PUBLIC' is also supported to mean all users.
Privileges can only be granted or revoked to one user or group
at a time.
* the bug where aggregates of empty tables were not run has been fixed. Now,
aggregates run on empty tables will return the initial conditions of the
aggregates. Thus, COUNT of an empty table will now properly return 0.
- MAX/MIN of an empty table will return a tuple of value NULL.
+ MAX/MIN of an empty table will return a row of value NULL.
* allow the use of \; inside the monitor
* the LISTEN/NOTIFY asynchronous notification mechanism now work
* NOTIFY in rule action bodies now work
libpgtcl changes:
* The -oid option has been added to the "pg_result" tcl command.
- pg_result -oid returns oid of the last tuple inserted. If the
+ pg_result -oid returns oid of the last row inserted. If the
last command was not an INSERT, then pg_result -oid returns "".
* the large object interface is available as pg_lo* tcl commands:
pg_lo_open, pg_lo_close, pg_lo_creat, etc.
index 40e7103e5471b8648339b35a3170b68c4b035181..c5fb9529122789cb01d1548709479284f0c2e3b4 100644 (file)
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/rules.sgml,v 1.30 2003年09月11日 21:42:20 momjian Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/rules.sgml,v 1.31 2003年11月01日 01:56:29 petere Exp $ -->
<Chapter Id="rules">
<Title>The Rule System</Title>
@@ -770,7 +770,7 @@ SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a;
the stage. Old table rows aren't overwritten, and this
is why <command>ROLLBACK</command> is fast. In an <command>UPDATE</command>,
the new result row is inserted into the table (after stripping the
- <acronym>CTID</>) and in the tuple header of the old row, which the
+ <acronym>CTID</>) and in the row header of the old row, which the
<acronym>CTID</> pointed to, the <literal>cmax</> and
<literal>xmax</> entries are set to the current command counter
and current transaction ID. Thus the old row is hidden, and after
index 10ac77f2752c57dcb4edec7643b1b5d78e10ecdc..382e1856c580cdb6886a287eb466c673cc933bd5 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.214 2003年10月17日 22:38:20 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.215 2003年11月01日 01:56:29 petere Exp $
-->
<Chapter Id="runtime">
<para>
Specifies the maximum amount of memory to be used by
<command>VACUUM</command> to keep track of to-be-reclaimed
- tuples. The value is specified in kilobytes, and defaults to
- 8192 kilobytes. Larger settings may improve the speed of
- vacuuming large tables that have many deleted tuples.
+ rows. The value is specified in kilobytes, and defaults to
+ 8192 kB. Larger settings may improve the speed of
+ vacuuming large tables that have many deleted rows.
</para>
</listitem>
</varlistentry>
<listitem>
<para>
Sets the query planner's estimate of the cost of processing
- each tuple during a query. This is measured as a fraction of
+ each row during a query. This is measured as a fraction of
the cost of a sequential page fetch. The default is 0.01.
</para>
</listitem>
<listitem>
<para>
Sets the query planner's estimate of the cost of processing
- each index tuple during an index scan. This is measured as a
+ each index row during an index scan. This is measured as a
fraction of the cost of a sequential page fetch. The default
is 0.001.
</para>
index aa05367d1632a69fbf29c736df6cfe6a2c866168..0a31d1127c4f29b73518a7285a34b4a69ef75bb2 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.84 2003年08月31日 17:32:20 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.85 2003年11月01日 01:56:29 petere Exp $
-->
<chapter id="sql-syntax">
</simplelist>
where the <replaceable>operator</replaceable> token follows the syntax
rules of <xref linkend="sql-syntax-operators">, or is one of the
- keywords <token>AND</token>, <token>OR</token>, and
+ keywords <token>AND</token>, <token>OR</token>, and
<token>NOT</token>, or is a qualified operator name
<synopsis>
<literal>OPERATOR(</><replaceable>schema</><literal>.</><replaceable>operatorname</><literal>)</>
@@ -1292,7 +1292,7 @@ SELECT name, (SELECT max(pop) FROM cities WHERE cities.state = states.name)
An <firstterm>array constructor</> is an expression that builds an
array value from values for its member elements. A simple array
constructor
- consists of the keyword <literal>ARRAY</literal>, a left square bracket
+ consists of the keyword <literal>ARRAY</literal>, a left square bracket
<literal>[</>, one or more expressions (separated by commas) for the
array element values, and finally a right square bracket <literal>]</>.
For example,
<para>
Multidimensional array values can be built by nesting array
constructors.
- In the inner constructors, the keyword <literal>ARRAY</literal> may
+ In the inner constructors, the keyword <literal>ARRAY</literal> may
be omitted. For example, these produce the same result:
<programlisting>
@@ -1352,7 +1352,7 @@ select ARRAY[f1, f2, '{{9,10},{11,12}}'::int[]] from arr;
<para>
It is also possible to construct an array from the results of a
subquery. In this form, the array constructor is written with the
- keyword <literal>ARRAY</literal> followed by a parenthesized (not
+ keyword <literal>ARRAY</literal> followed by a parenthesized (not
bracketed) subquery. For example:
<programlisting>
SELECT ARRAY(SELECT oid FROM pg_proc WHERE proname LIKE 'bytea%');
@@ -1361,9 +1361,9 @@ SELECT ARRAY(SELECT oid FROM pg_proc WHERE proname LIKE 'bytea%');
{2011,1954,1948,1952,1951,1244,1950,2005,1949,1953,2006,31}
(1 row)
</programlisting>
- The sub-select must return a single column. The
+ The subquery must return a single column. The
resulting one-dimensional array will have an element for each row in the
- sub-select result, with an element type matching that of the sub-select's
+ subquery result, with an element type matching that of the subquery's
output column.
</para>
index 59e88da29ab2b5cbd69a2a7c0449ea01b7801287..d98bb7d968f7ecab9e48f39a94f19f468dab751a 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/typeconv.sgml,v 1.35 2003年09月30日 03:22:33 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/typeconv.sgml,v 1.36 2003年11月01日 01:56:29 petere Exp $
-->
<chapter Id="typeconv">
@@ -297,7 +297,7 @@ If only one candidate remains, use it; else continue to the next step.
<step performance="required">
<para>
Run through all candidates and keep those that accept preferred types (of the
-input datatype's type category) at the most positions where type conversion
+input datatype's type category) at the most positions where type conversion
will be required.
Keep all candidates if none accept preferred types.
If only one candidate remains, use it; else continue to the next step.
@@ -550,7 +550,7 @@ If only one candidate remains, use it; else continue to the next step.
<step performance="required">
<para>
Run through all candidates and keep those that accept preferred types (of the
-input datatype's type category) at the most positions where type conversion
+input datatype's type category) at the most positions where type conversion
will be required.
Keep all candidates if none accept preferred types.
If only one candidate remains, use it; else continue to the next step.
index dc5c3bd4c26a14fd04e22a7a662225fc2296e12b..0c1a7610df2e29b00c15270aa574950110824bf5 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/xfunc.sgml,v 1.76 2003年10月22日 22:28:10 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/xfunc.sgml,v 1.77 2003年11月01日 01:56:29 petere Exp $
-->
<sect1 id="xfunc">
@@ -2122,7 +2122,7 @@ CREATE OR REPLACE FUNCTION testpassbyval(integer, integer) RETURNS SETOF __testp
of its arguments and the type it is expected to return. The routines are
called <literal>get_fn_expr_rettype(FmgrInfo *flinfo)</> and
<literal>get_fn_expr_argtype(FmgrInfo *flinfo, int argnum)</>.
- They return the result or argument type OID, or InvalidOid if the
+ They return the result or argument type OID, or <symbol>InvalidOid</symbol> if the
information is not available.
The structure <literal>flinfo</> is normally accessed as
<literal>fcinfo->flinfo</>. The parameter <literal>argnum</>
index aa9e39794e8d7b1a37ee4f3023f71638d1f25b77..85aba8abe7058d61aa4990336bb2b83905d82e71 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/xindex.sgml,v 1.33 2003年10月21日 23:28:42 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/xindex.sgml,v 1.34 2003年11月01日 01:56:29 petere Exp $
-->
<sect1 id="xindex">
@@ -431,7 +431,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/xindex.sgml,v 1.33 2003年10月21日 23:28:42 tgl
<para>
The least error-prone way to define a related set of comparison operators
- is to write the btree comparison support function first, and then write the
+ is to write the B-tree comparison support function first, and then write the
other functions as one-line wrappers around the support function. This
reduces the odds of getting inconsistent results for corner cases.
Following this approach, we first write
<productname>PostgreSQL</productname> uses operator classes to infer the
properties of operators in more ways than just whether they can be used
with indexes. Therefore, you might want to create operator classes
- even if you have no intention of indexing any columns of your datatype.
+ even if you have no intention of indexing any columns of your datatype.
</para>
<para>
In particular, there are SQL features such as <literal>ORDER BY</> and
<literal>DISTINCT</> that require comparison and sorting of values.
- To implement these features on a user-defined datatype,
+ To implement these features on a user-defined datatype,
<productname>PostgreSQL</productname> looks for the default B-tree operator
- class for the datatype. The <quote>equals</> member of this operator
+ class for the datatype. The <quote>equals</> member of this operator
class defines the system's notion of equality of values for
<literal>GROUP BY</> and <literal>DISTINCT</>, and the sort ordering
imposed by the operator class defines the default <literal>ORDER BY</>
</para>
<para>
- If there is no default B-tree operator class for a datatype, the system
+ If there is no default B-tree operator class for a datatype, the system
will look for a default hash operator class. But since that kind of
operator class only provides equality, in practice it is only enough
to support array equality.
</para>
<para>
- When there is no default operator class for a datatype, you will get
+ When there is no default operator class for a datatype, you will get
errors like <quote>could not identify an ordering operator</> if you
- try to use these SQL features with the datatype.
+ try to use these SQL features with the datatype.
</para>
<note>
index 39c49d403615557e4dcc8d8c8bc6236dd73cedb6..6e5c966bb5d1eee4e668a7a3dae759ab9c97fc8b 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/xoper.sgml,v 1.28 2003年10月22日 03:50:27 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/xoper.sgml,v 1.29 2003年11月01日 01:56:29 petere Exp $
-->
<sect1 id="xoper">
a WHERE clause like <literal>tab1.x = tab2.y</>, where <literal>tab1.x</>
and <literal>tab2.y</> are of a user-defined type, and suppose that
<literal>tab2.y</> is indexed. The optimizer cannot generate an
- indexscan unless it can determine how to flip the clause around to
- <literal>tab2.y = tab1.x</>, because the indexscan machinery expects
+ indexscan unless it can determine how to flip the clause around to
+ <literal>tab2.y = tab1.x</>, because the index-scan machinery expects
to see the indexed column on the left of the operator it is given.
<ProductName>PostgreSQL</ProductName> will <emphasis>not</> simply
assume that this is a valid transformation --- the creator of the
the operator, since of course the referencing operator class couldn't
exist yet. But attempts to use the operator in hash joins will fail
at runtime if no such operator class exists. The system needs the
- operator class to find the datatype-specific hash function for the
- operator's input datatype. Of course, you must also supply a suitable
+ operator class to find the data-type-specific hash function for the
+ operator's input datatype. Of course, you must also supply a suitable
hash function before you can create the operator class.
</para>
<note>
<para>
- The function underlying a hashjoinable operator must be marked
+ The function underlying a hash-joinable operator must be marked
immutable or stable. If it is volatile, the system will never
attempt to use the operator for a hash join.
</para>
<note>
<para>
- If a hashjoinable operator has an underlying function that is marked
+ If a hash-joinable operator has an underlying function that is marked
strict, the
- function must also be complete: that is, it should return TRUE or
- FALSE, never NULL, for any two non-NULL inputs. If this rule is
+ function must also be complete: that is, it should return true or
+ false, never null, for any two nonnull inputs. If this rule is
not followed, hash-optimization of <literal>IN</> operations may
generate wrong results. (Specifically, <literal>IN</> might return
- FALSE where the correct answer per spec would be NULL; or it might
- yield an error complaining that it wasn't prepared for a NULL result.)
+ false where the correct answer according to the standard would be null; or it might
+ yield an error complaining that it wasn't prepared for a null result.)
</para>
</note>
<note>
<para>
- The function underlying a mergejoinable operator must be marked
+ The function underlying a merge-joinable operator must be marked
immutable or stable. If it is volatile, the system will never
attempt to use the operator for a merge join.
</para>
index afd35ab70013c20dc095af95cb32e20ee68d452a..bd2398e51e20461462756c17755496693ecf1bf2 100644 (file)
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/xtypes.sgml,v 1.21 2003年10月21日 22:51:14 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/xtypes.sgml,v 1.22 2003年11月01日 01:56:29 petere Exp $
-->
<sect1 id="xtypes">
Optionally, a user-defined type can provide binary input and output
routines. Binary I/O is normally faster but less portable than textual
I/O. As with textual I/O, it is up to you to define exactly what the
- external binary representation is. Most of the built-in datatypes
+ external binary representation is. Most of the built-in datatypes
try to provide a machine-independent binary representation. For
<type>complex</type>, we will piggy-back on the binary I/O converters
for type <type>float8</>:
the total length in bytes of the datum (including itself). The C
functions operating on the data type must be careful to unpack any
toasted values they are handed (this detail can normally be hidden in the
- GETARG macros). Then,
+ <function>GETARG</function> macros). Then,
when running the <command>CREATE TYPE</command> command, specify the
internal length as <literal>variable</> and select the appropriate
storage option.