Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
cc093bc3
Commit
cc093bc3
authored
Jan 04, 2005
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More minor updates and copy-editing.
parent
248d92dd
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
322 additions
and
274 deletions
+322
-274
doc/src/sgml/ref/ipcclean.sgml
doc/src/sgml/ref/ipcclean.sgml
+5
-4
doc/src/sgml/ref/pg_config-ref.sgml
doc/src/sgml/ref/pg_config-ref.sgml
+2
-2
doc/src/sgml/ref/pg_dump.sgml
doc/src/sgml/ref/pg_dump.sgml
+86
-79
doc/src/sgml/ref/pg_dumpall.sgml
doc/src/sgml/ref/pg_dumpall.sgml
+56
-50
doc/src/sgml/ref/pg_restore.sgml
doc/src/sgml/ref/pg_restore.sgml
+47
-46
doc/src/sgml/ref/psql-ref.sgml
doc/src/sgml/ref/psql-ref.sgml
+33
-29
doc/src/sgml/ref/select.sgml
doc/src/sgml/ref/select.sgml
+57
-45
doc/src/sgml/ref/select_into.sgml
doc/src/sgml/ref/select_into.sgml
+3
-7
doc/src/sgml/ref/show.sgml
doc/src/sgml/ref/show.sgml
+12
-11
doc/src/sgml/ref/update.sgml
doc/src/sgml/ref/update.sgml
+21
-1
No files found.
doc/src/sgml/ref/ipcclean.sgml
View file @
cc093bc3
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/ipcclean.sgml,v 1.1
0 2003/11/29 19:51:39 pgsq
l Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/ipcclean.sgml,v 1.1
1 2005/01/04 03:58:16 tg
l Exp $
PostgreSQL documentation
-->
...
...
@@ -12,7 +12,7 @@ PostgreSQL documentation
<refnamediv>
<refname>ipcclean</refname>
<refpurpose>remove shared memory and semaphores from a
n abort
ed <productname>PostgreSQL</productname> server</refpurpose>
<refpurpose>remove shared memory and semaphores from a
fail
ed <productname>PostgreSQL</productname> server</refpurpose>
</refnamediv>
<indexterm zone="app-ipcclean">
...
...
@@ -59,10 +59,11 @@ PostgreSQL documentation
</para>
<para>
The script makes assumption
about the format of outpu
t of the
The script makes assumption
s about the output forma
t of the
<command>ipcs</command>
utility which may not be true across different operating systems.
Therefore, it may not work on your particular OS.
Therefore, it may not work on your particular OS. It's wise to
look at the script before trying it.
</para>
</refsect1>
...
...
doc/src/sgml/ref/pg_config-ref.sgml
View file @
cc093bc3
<
!-- $PostgreSQL: pgsql/doc/src/sgml/ref/pg_config-ref.sgml,v 1.1
8 2004/08/02 12:34:14 momjian
Exp $ -->
<
!-- $PostgreSQL: pgsql/doc/src/sgml/ref/pg_config-ref.sgml,v 1.1
9 2005/01/04 03:58:16 tgl
Exp $ -->
<
refentry
id
=
"app-pgconfig"
>
<
refmeta
>
...
...
@@ -153,7 +153,7 @@
</
para
>
<
para
>
In
releases
prior
to
<
productname
>
PostgreSQL
</>
7.1
,
before
the
In
releases
prior
to
<
productname
>
PostgreSQL
</>
7.1
,
before
<
command
>
pg_config
</
command
>
came
to
be
,
a
method
for
finding
the
equivalent
configuration
information
did
not
exist
.
</
para
>
...
...
doc/src/sgml/ref/pg_dump.sgml
View file @
cc093bc3
This diff is collapsed.
Click to expand it.
doc/src/sgml/ref/pg_dumpall.sgml
View file @
cc093bc3
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.4
6 2004/07/19 21:39:46 momjian
Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.4
7 2005/01/04 03:58:16 tgl
Exp $
PostgreSQL documentation
-->
...
...
@@ -68,7 +68,8 @@ PostgreSQL documentation
<para>
<application>pg_dumpall</application> needs to connect several
times to the <productname>PostgreSQL</productname> server and might be asking for
times to the <productname>PostgreSQL</productname> server (once per
database). If you use password authentication it is likely to ask for
a password each time. It is convenient to have a
<filename>$HOME/.pgpass</> file in such cases.
</para>
...
...
@@ -79,7 +80,7 @@ PostgreSQL documentation
<title>Options</title>
<para>
The following command-line options
are used to
control the content and
The following command-line options control the content and
format of the output.
<variablelist>
...
...
@@ -88,7 +89,7 @@ PostgreSQL documentation
<term><option>--data-only</></term>
<listitem>
<para>
Dump only the data, not the schema (data definitions).
Dump only the data, not the schema (data definitions).
</para>
</listitem>
</varlistentry>
...
...
@@ -98,8 +99,8 @@ PostgreSQL documentation
<term><option>--clean</option></term>
<listitem>
<para>
Include SQL commands to clean (drop) the databases before
recreating them.
Include SQL commands to clean (drop) the databases before
recreating them.
</para>
</listitem>
</varlistentry>
...
...
@@ -109,10 +110,12 @@ PostgreSQL documentation
<term><option>--inserts</option></term>
<listitem>
<para>
Dump data as <command>INSERT</command> commands (rather
than <command>COPY</command>). This will make restoration very
slow, but it makes the output more portable to other SQL database
management systems.
Dump data as <command>INSERT</command> commands (rather
than <command>COPY</command>). This will make restoration very slow;
it is mainly useful for making dumps that can be loaded into
non-<productname>PostgreSQL</productname> databases. Note that
the restore may fail altogether if you have rearranged column order.
The <option>-D</option> option is safer, though even slower.
</para>
</listitem>
</varlistentry>
...
...
@@ -123,12 +126,13 @@ PostgreSQL documentation
<term><option>--attribute-inserts</option></term>
<listitem>
<para>
Dump data as <command>INSERT</command> commands with explicit
column names (<literal>INSERT INTO
<replaceable>table</replaceable>
(<replaceable>column</replaceable>, ...) VALUES
...</literal>). This will make restoration very slow,
but it is necessary if you desire to rearrange column ordering.
Dump data as <command>INSERT</command> commands with explicit
column names (<literal>INSERT INTO
<replaceable>table</replaceable>
(<replaceable>column</replaceable>, ...) VALUES
...</literal>). This will make restoration very slow; it is mainly
useful for making dumps that can be loaded into
non-<productname>PostgreSQL</productname> databases.
</para>
</listitem>
</varlistentry>
...
...
@@ -138,7 +142,7 @@ PostgreSQL documentation
<term><option>--globals-only</option></term>
<listitem>
<para>
Dump only global objects (users and groups), no databases.
Dump only global objects (users and groups), no databases.
</para>
</listitem>
</varlistentry>
...
...
@@ -168,10 +172,11 @@ PostgreSQL documentation
<term><option>--oids</></term>
<listitem>
<para>
Dump object identifiers (<acronym>OID</acronym>s) for every
table. Use this option if your application references the OID
columns in some way (e.g., in a foreign key constraint).
Otherwise, this option should not be used.
Dump object identifiers (<acronym>OID</acronym>s) as part of the
data for every table. Use this option if your application references
the <acronym>OID</>
columns in some way (e.g., in a foreign key constraint).
Otherwise, this option should not be used.
</para>
</listitem>
</varlistentry>
...
...
@@ -182,15 +187,16 @@ PostgreSQL documentation
<listitem>
<para>
Do not output commands to set
ownership of objects to match the original database.
By default, <application>pg_dumpall</application> issues
<command>SET SESSION AUTHORIZATION</command>
statements to set ownership of created schema elements.
These statements
will fail when the script is run unless it is started by a superuser
(or the same user that owns all of the objects in the script).
To make a script that can be restored by any user, but will give
that user ownership of all the objects, specify <option>-O</>.
ownership of objects to match the original database.
By default, <application>pg_dumpall</application> issues
<command>ALTER OWNER</> or
<command>SET SESSION AUTHORIZATION</command>
statements to set ownership of created schema elements.
These statements
will fail when the script is run unless it is started by a superuser
(or the same user that owns all of the objects in the script).
To make a script that can be restored by any user, but will give
that user ownership of all the objects, specify <option>-O</>.
</para>
</listitem>
</varlistentry>
...
...
@@ -200,7 +206,7 @@ PostgreSQL documentation
<term><option>--schema-only</option></term>
<listitem>
<para>
Dump only the schema (data definitions), no
data.
Dump only the object definitions (schema), not
data.
</para>
</listitem>
</varlistentry>
...
...
@@ -211,9 +217,9 @@ PostgreSQL documentation
<listitem>
<para>
Specify the superuser user name to use when disabling triggers.
This is only relevant if <option>--disable-triggers</> is used.
(Usually, it's better to leave this out, and instead start the
resulting script as superuser.)
This is only relevant if <option>--disable-triggers</> is used.
(Usually, it's better to leave this out, and instead start the
resulting script as superuser.)
</para>
</listitem>
</varlistentry>
...
...
@@ -223,8 +229,8 @@ PostgreSQL documentation
<term><option>--verbose</></term>
<listitem>
<para>
Specifies verbose mode. This will cause
<application>pg_dumpall</application> to output start/stop
Specifies verbose mode. This will cause
<application>pg_dumpall</application> to output start/stop
times to the dump file, and progress messages to standard error.
It will also enable verbose output in <application>pg_dump</>.
</para>
...
...
@@ -237,7 +243,7 @@ PostgreSQL documentation
<term><option>--no-acl</></term>
<listitem>
<para>
Prevent dumping of access privileges (grant/revoke commands).
Prevent dumping of access privileges (grant/revoke commands).
</para>
</listitem>
</varlistentry>
...
...
@@ -280,10 +286,10 @@ PostgreSQL documentation
<term><option>--use-set-session-authorization</></term>
<listitem>
<para>
Output SQL standard SET SESSION AUTHORIZATION commands instead
of OWNER TO commands. This makes the dump more standards compatible,
but depending on the history of the objects in the dump, may not
restore properly.
Output SQL standard SET SESSION AUTHORIZATION commands instead
of OWNER TO commands. This makes the dump more standards compatible,
but depending on the history of the objects in the dump, may not
restore properly.
</para>
</listitem>
</varlistentry>
...
...
@@ -299,11 +305,11 @@ PostgreSQL documentation
<term>-h <replaceable>host</replaceable></term>
<listitem>
<para>
Specifies the host name of the machine on which the database
server is running. If the value begins with a slash, it is
used as the directory for the Unix domain socket. The default
is taken from the <envar>PGHOST</envar> environment variable,
if set, else a Unix domain socket connection is attempted.
Specifies the host name of the machine on which the database
server is running. If the value begins with a slash, it is
used as the directory for the Unix domain socket. The default
is taken from the <envar>PGHOST</envar> environment variable,
if set, else a Unix domain socket connection is attempted.
</para>
</listitem>
</varlistentry>
...
...
@@ -312,10 +318,10 @@ PostgreSQL documentation
<term>-p <replaceable>port</replaceable></term>
<listitem>
<para>
Specifies the TCP port or local Unix domain socket file
extension on which the server is listening for connections.
Defaults to the <envar>PGPORT</envar> environment variable, if
set, or a compiled-in default.
Specifies the TCP port or local Unix domain socket file
extension on which the server is listening for connections.
Defaults to the <envar>PGPORT</envar> environment variable, if
set, or a compiled-in default.
</para>
</listitem>
</varlistentry>
...
...
doc/src/sgml/ref/pg_restore.sgml
View file @
cc093bc3
<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.4
8 2004/08/20 04:20:22 momjian
Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.4
9 2005/01/04 03:58:16 tgl
Exp $ -->
<refentry id="APP-PGRESTORE">
<refmeta>
...
...
@@ -88,7 +88,7 @@
<term><option>--data-only</option></term>
<listitem>
<para>
Restore only the data, not the schema (data definitions).
Restore only the data, not the schema (data definitions).
</para>
</listitem>
</varlistentry>
...
...
@@ -98,7 +98,7 @@
<term><option>--clean</option></term>
<listitem>
<para>
Clean (drop) database objects before recreating them.
Clean (drop) database objects before recreating them.
</para>
</listitem>
</varlistentry>
...
...
@@ -158,10 +158,10 @@
<term><option>--format=<replaceable class="parameter">format</replaceable></option></term>
<listitem>
<para>
Specify format of the archive. It is not necessary to specify
the format, since <application>pg_restore</application> will
determine the format automatically. If specified, it can be
one of the following:
Specify format of the archive. It is not necessary to specify
the format, since <application>pg_restore</application> will
determine the format automatically. If specified, it can be
one of the following:
<variablelist>
<varlistentry>
...
...
@@ -198,7 +198,7 @@
<term><option>--ignore-version</option></term>
<listitem>
<para>
Ignore database version checks.
Ignore database version checks.
</para>
</listitem>
</varlistentry>
...
...
@@ -208,7 +208,7 @@
<term><option>--index=<replaceable class="parameter">index</replaceable></option></term>
<listitem>
<para>
Restore definition of named index only.
Restore definition of named index only.
</para>
</listitem>
</varlistentry>
...
...
@@ -245,15 +245,16 @@
<listitem>
<para>
Do not output commands to set
ownership of objects to match the original database.
By default, <application>pg_restore</application> issues
<command>SET SESSION AUTHORIZATION</command>
statements to set ownership of created schema elements.
These statements will fail unless the initial connection to the
database is made by a superuser
(or the same user that owns all of the objects in the script).
With <option>-O</option>, any user name can be used for the
initial connection, and this user will own all the created objects.
ownership of objects to match the original database.
By default, <application>pg_restore</application> issues
<command>ALTER OWNER</> or
<command>SET SESSION AUTHORIZATION</command>
statements to set ownership of created schema elements.
These statements will fail unless the initial connection to the
database is made by a superuser
(or the same user that owns all of the objects in the script).
With <option>-O</option>, any user name can be used for the
initial connection, and this user will own all the created objects.
</para>
</listitem>
</varlistentry>
...
...
@@ -264,8 +265,8 @@
<listitem>
<para>
Restore the named function only. Be careful to spell the function
name and arguments exactly as they appear in the dump file's table
of contents.
name and arguments exactly as they appear in the dump file's table
of contents.
</para>
</listitem>
</varlistentry>
...
...
@@ -276,7 +277,7 @@
<listitem>
<para>
This option is obsolete but still accepted for backwards
compatibility.
compatibility.
</para>
</listitem>
</varlistentry>
...
...
@@ -298,7 +299,7 @@
<listitem>
<para>
Specify the superuser user name to use when disabling triggers.
This is only relevant if <option>--disable-triggers</> is used.
This is only relevant if <option>--disable-triggers</> is used.
</para>
</listitem>
</varlistentry>
...
...
@@ -328,7 +329,7 @@
<term><option>--verbose</option></term>
<listitem>
<para>
Specifies verbose mode.
Specifies verbose mode.
</para>
</listitem>
</varlistentry>
...
...
@@ -339,7 +340,7 @@
<term><option>--no-acl</option></term>
<listitem>
<para>
Prevent restoration of access privileges (grant/revoke commands).
Prevent restoration of access privileges (grant/revoke commands).
</para>
</listitem>
</varlistentry>
...
...
@@ -349,10 +350,10 @@
<term><option>--use-set-session-authorization</option></term>
<listitem>
<para>
Output SQL standard SET SESSION AUTHORIZATION commands instead
of OWNER TO commands. This makes the dump more standards compatible,
but depending on the history of the objects in the dump, may not
restore properly.
Output SQL standard SET SESSION AUTHORIZATION commands instead
of OWNER TO commands. This makes the dump more standards compatible,
but depending on the history of the objects in the dump, may not
restore properly.
</para>
</listitem>
</varlistentry>
...
...
@@ -363,19 +364,19 @@
<listitem>
<para>
This option is only relevant when performing a data-only restore.
It instructs <application>pg_restore</application> to execute commands
to temporarily disable triggers on the target tables while
the data is reloaded. Use this if you have referential
integrity checks or other triggers on the tables that you
do not want to invoke during data reload.
It instructs <application>pg_restore</application> to execute commands
to temporarily disable triggers on the target tables while
the data is reloaded. Use this if you have referential
integrity checks or other triggers on the tables that you
do not want to invoke during data reload.
</para>
<para>
Presently, the commands emitted for
<option>--disable-triggers</> must be done as superuser. So, you
should also specify a superuser name with <option>-S</>, or
preferably run <application>pg_restore</application> as a
<productname>PostgreSQL</> superuser.
<option>--disable-triggers</> must be done as superuser. So, you
should also specify a superuser name with <option>-S</>, or
preferably run <application>pg_restore</application> as a
<productname>PostgreSQL</> superuser.
</para>
</listitem>
</varlistentry>
...
...
@@ -393,11 +394,11 @@
<term><option>--host=<replaceable class="parameter">host</replaceable></option></term>
<listitem>
<para>
Specifies the host name of the machine on which the server is
running. If the value begins with a slash, it is used as the
directory for the Unix domain socket. The default is taken
from the <envar>PGHOST</envar> environment variable, if set,
else a Unix domain socket connection is attempted.
Specifies the host name of the machine on which the server is
running. If the value begins with a slash, it is used as the
directory for the Unix domain socket. The default is taken
from the <envar>PGHOST</envar> environment variable, if set,
else a Unix domain socket connection is attempted.
</para>
</listitem>
</varlistentry>
...
...
@@ -407,10 +408,10 @@
<term><option>--port=<replaceable class="parameter">port</replaceable></option></term>
<listitem>
<para>
Specifies the TCP port or local Unix domain socket file
extension on which the server is listening for connections.
Defaults to the <envar>PGPORT</envar> environment variable, if
set, or a compiled-in default.
Specifies the TCP port or local Unix domain socket file
extension on which the server is listening for connections.
Defaults to the <envar>PGPORT</envar> environment variable, if
set, or a compiled-in default.
</para>
</listitem>
</varlistentry>
...
...
doc/src/sgml/ref/psql-ref.sgml
View file @
cc093bc3
This diff is collapsed.
Click to expand it.
doc/src/sgml/ref/select.sgml
View file @
cc093bc3
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/select.sgml,v 1.7
8 2004/11/27 21:27:07 petere
Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/select.sgml,v 1.7
9 2005/01/04 03:58:16 tgl
Exp $
PostgreSQL documentation
-->
...
...
@@ -81,6 +81,16 @@ where <replaceable class="parameter">from_item</replaceable> can be one of:
</para>
</listitem>
<listitem>
<para>
The actual output rows are computed using the
<command>SELECT</command> output expressions for each selected
row. (See
<xref linkend="sql-select-list" endterm="sql-select-list-title">
below.)
</para>
</listitem>
<listitem>
<para>
Using the operators <literal>UNION</literal>,
...
...
@@ -100,16 +110,6 @@ where <replaceable class="parameter">from_item</replaceable> can be one of:
</para>
</listitem>
<listitem>
<para>
The actual output rows are computed using the
<command>SELECT</command> output expressions for each selected
row. (See
<xref linkend="sql-select-list" endterm="sql-select-list-title">
below.)
</para>
</listitem>
<listitem>
<para>
If the <literal>ORDER BY</literal> clause is specified, the
...
...
@@ -453,6 +453,34 @@ HAVING <replaceable class="parameter">condition</replaceable>
appears within an aggregate function.
</para>
</refsect2>
<refsect2 id="sql-select-list">
<title id="sql-select-list-title"><command>SELECT</command> List</title>
<para>
The <command>SELECT</command> list (between the key words
<literal>SELECT</> and <literal>FROM</>) specifies expressions
that form the output rows of the <command>SELECT</command>
statement. The expressions can (and usually do) refer to columns
computed in the <literal>FROM</> clause. Using the clause
<literal>AS <replaceable
class="parameter">output_name</replaceable></literal>, another
name can be specified for an output column. This name is
primarily used to label the column for display. It can also be
used to refer to the column's value in <literal>ORDER BY</> and
<literal>GROUP BY</> clauses, but not in the <literal>WHERE</> or
<literal>HAVING</> clauses; there you must write out the
expression instead.
</para>
<para>
Instead of an expression, <literal>*</literal> can be written in
the output list as a shorthand for all the columns of the selected
rows. Also, one can write <literal><replaceable
class="parameter">table_name</replaceable>.*</literal> as a
shorthand for the columns coming from just that table.
</para>
</refsect2>
<refsect2 id="SQL-UNION">
<title id="sql-union-title"><literal>UNION</literal> Clause</title>
...
...
@@ -486,7 +514,9 @@ HAVING <replaceable class="parameter">condition</replaceable>
<para>
The result of <literal>UNION</> does not contain any duplicate
rows unless the <literal>ALL</> option is specified.
<literal>ALL</> prevents elimination of duplicates.
<literal>ALL</> prevents elimination of duplicates. (Therefore,
<literal>UNION ALL</> is usually significantly quicker than
<literal>UNION</>; use <literal>ALL</> when you can.)
</para>
<para>
...
...
@@ -524,9 +554,9 @@ HAVING <replaceable class="parameter">condition</replaceable>
<para>
The result of <literal>INTERSECT</literal> does not contain any
duplicate rows unless the <literal>ALL</> option is specified.
With <literal>ALL</>, a row that has
m duplicates in the left
table and n duplicates in the right table will appear min(m,n)
times in the result set.
With <literal>ALL</>, a row that has
<replaceable>m</> duplicates in the
left table and <replaceable>n</> duplicates in the right table will appear
min(<replaceable>m</>,<replaceable>n</>)
times in the result set.
</para>
<para>
...
...
@@ -538,6 +568,11 @@ HAVING <replaceable class="parameter">condition</replaceable>
C</literal> will be read as <literal>A UNION (B INTERSECT
C)</literal>.
</para>
<para>
Currently, <literal>FOR UPDATE</> may not be specified either for
an <literal>INTERSECT</> result or for any input of an <literal>INTERSECT</>.
</para>
</refsect2>
<refsect2 id="SQL-EXCEPT">
...
...
@@ -562,9 +597,9 @@ HAVING <replaceable class="parameter">condition</replaceable>
<para>
The result of <literal>EXCEPT</literal> does not contain any
duplicate rows unless the <literal>ALL</> option is specified.
With <literal>ALL</>, a row that has
m duplicates in the left
table and n duplicates in the right table will appear max(m-n,0)
times in the result set.
With <literal>ALL</>, a row that has
<replaceable>m</> duplicates in the
left table and <replaceable>n</> duplicates in the right table will appear
max(<replaceable>m</>-<replaceable>n</>,0)
times in the result set.
</para>
<para>
...
...
@@ -573,33 +608,10 @@ HAVING <replaceable class="parameter">condition</replaceable>
unless parentheses dictate otherwise. <literal>EXCEPT</> binds at
the same level as <literal>UNION</>.
</para>
</refsect2>
<refsect2 id="sql-select-list">
<title id="sql-select-list-title"><command>SELECT</command> List</title>
<para>
The <command>SELECT</command> list (between the key words
<literal>SELECT</> and <literal>FROM</>) specifies expressions
that form the output rows of the <command>SELECT</command>
statement. The expressions can (and usually do) refer to columns
computed in the <literal>FROM</> clause. Using the clause
<literal>AS <replaceable
class="parameter">output_name</replaceable></literal>, another
name can be specified for an output column. This name is
primarily used to label the column for display. It can also be
used to refer to the column's value in <literal>ORDER BY</> and
<literal>GROUP BY</> clauses, but not in the <literal>WHERE</> or
<literal>HAVING</> clauses; there you must write out the
expression instead.
</para>
<para>
Instead of an expression, <literal>*</literal> can be written in
the output list as a shorthand for all the columns of the selected
rows. Also, one can write <literal><replaceable
class="parameter">table_name</replaceable>.*</literal> as a
shorthand for the columns coming from just that table.
Currently, <literal>FOR UPDATE</> may not be specified either for
an <literal>EXCEPT</> result or for any input of an <literal>EXCEPT</>.
</para>
</refsect2>
...
...
@@ -707,7 +719,7 @@ OFFSET <replaceable class="parameter">start</replaceable>
When using <literal>LIMIT</>, it is a good idea to use an
<literal>ORDER BY</> clause that constrains the result rows into a
unique order. Otherwise you will get an unpredictable subset of
the query's rows
---
you may be asking for the tenth through
the query's rows
—
you may be asking for the tenth through
twentieth rows, but tenth through twentieth in what ordering? You
don't know what ordering unless you specify <literal>ORDER BY</>.
</para>
...
...
doc/src/sgml/ref/select_into.sgml
View file @
cc093bc3
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/select_into.sgml,v 1.3
1 2004/09/26 23:48:07 neilc
Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/select_into.sgml,v 1.3
2 2005/01/04 03:58:16 tgl
Exp $
PostgreSQL documentation
-->
...
...
@@ -95,12 +95,8 @@ SELECT [ ALL | DISTINCT [ ON ( <replaceable class="PARAMETER">expression</replac
<para>
Prior to <productname>PostgreSQL</> 8.0, the table created by
<command>SELECT INTO</command> always included OIDs. Furthermore,
these OIDs were newly generated: they were distinct from the OIDs
of any of the rows in the source tables of the <command>SELECT
INTO</command> statement. Therefore, if <command>SELECT
INTO</command> was frequently executed, the OID counter would be
rapidly incremented. As of <productname>PostgreSQL</> 8.0, the
<command>SELECT INTO</command> always included OIDs.
As of <productname>PostgreSQL</> 8.0, the
inclusion of OIDs in the table created by <command>SELECT
INTO</command> is controlled by the
<xref linkend="guc-default-with-oids"> configuration variable. This
...
...
doc/src/sgml/ref/show.sgml
View file @
cc093bc3
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/show.sgml,v 1.3
6 2004/08/03 20:32:32
tgl Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/show.sgml,v 1.3
7 2005/01/04 03:58:16
tgl Exp $
PostgreSQL documentation
-->
...
...
@@ -105,7 +105,7 @@ SHOW ALL
<listitem>
<para>
True if the current session authorization identifier has
superuser privileges.
superuser privileges.
</para>
</listitem>
</varlistentry>
...
...
@@ -118,7 +118,7 @@ SHOW ALL
<term><literal>ALL</literal></term>
<listitem>
<para>
Show the values of all configuration
s
parameters.
Show the values of all configuration parameters.
</para>
</listitem>
</varlistentry>
...
...
@@ -164,17 +164,17 @@ SHOW geqo;
Show all settings:
<programlisting>
SHOW ALL;
name |
setting
-------------------------------
+
---------------------------------------
a
ustralian_timezones | off
a
uthentication_timeout | 60
checkpoint_segments | 3
name |
setting
-------------------------------
-+-------
---------------------------------------
a
dd_missing_from | on
a
rchive_command | unset
australian_timezones | off
.
.
.
w
al_debug | off
wal_sync_method | fdatasync
(
94
rows)
w
ork_mem | 1024
zero_damaged_pages | off
(
140
rows)
</programlisting>
</para>
</refsect1>
...
...
@@ -193,6 +193,7 @@ SHOW ALL;
<simplelist type="inline">
<member><xref linkend="SQL-SET" endterm="SQL-SET-title"></member>
<member><xref linkend="SQL-RESET" endterm="SQL-RESET-title"></member>
</simplelist>
</refsect1>
...
...
doc/src/sgml/ref/update.sgml
View file @
cc093bc3
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/update.sgml,v 1.3
0 2004/08/08 01:48:31 momjian
Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/update.sgml,v 1.3
1 2005/01/04 03:58:16 tgl
Exp $
PostgreSQL documentation
-->
...
...
@@ -150,6 +150,26 @@ UPDATE <replaceable class="parameter">count</replaceable>
</para>
</refsect1>
<refsect1>
<title>Notes</title>
<para>
When joining the target table to other tables using a <replaceable
class="PARAMETER">fromlist</replaceable>, be careful that the join
produces at most one output row for each row to be modified. In
other words, a target row mustn't join to more than one row from
the other table(s). If it does, then only one of the join rows
will be used to update the target row, but which one will be used
is not readily predictable.
</para>
<para>
Because of this indeterminancy, referencing other tables only within
sub-selects is safer, though often harder to read and slower than
using a join.
</para>
</refsect1>
<refsect1>
<title>Examples</title>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment