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