pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feedDocumentation patch for COPY and SELECT
2+ messages / 2 participants
[nested] [flat]
* Documentation patch for COPY and SELECT
@ 1999-01-29 11:01 Oliver Elphick <olly@lfix.co.uk>
0 siblings, 1 reply; 2+ messages in thread
From: Oliver Elphick @ 1999-01-29 11:01 UTC (permalink / raw)
To: patches@postgreSQL.org; docs@postgreSQL.org
This patch is to expand the reference documentation for COPY and SELECT:
inline patch 1: postgresql-6.4.2/doc/src/sgml/ref/copy.sgml, postgresql-6.4.2/doc/src/sgml/ref/select.sgml (+33/-12 lines) download inline-1.patch
*** postgresql-6.4.2.orig/doc/src/sgml/ref/copy.sgml Thu Jan 28 16:11:12 1999
--- postgresql-6.4.2/doc/src/sgml/ref/copy.sgml Thu Jan 28 16:10:22 1999
***************
*** 390,396 ****
</refsect1>
<refsect1 ID="R1-SQL-COPY-5">
! <title>Bugs</title>
<para>
<command>COPY</command> stops operation at the first error. This
should not lead to problems in the event of
--- 390,400 ----
</refsect1>
<refsect1 ID="R1-SQL-COPY-5">
! <title>Bugs and features</title>
! <para>
! <command>COPY</command> neither invokes rules nor acts on column defaults.
! It does invoke triggers, however.
! </para>
<para>
<command>COPY</command> stops operation at the first error. This
should not lead to problems in the event of
*** postgresql-6.4.2.orig/doc/src/sgml/ref/select.sgml Thu Jan 28 16:11:12 1999
--- postgresql-6.4.2/doc/src/sgml/ref/select.sgml Thu Jan 28 16:16:35 1999
***************
*** 190,198 ****
Description
</title>
<para>
! <command>SELECT</command> will get all rows which satisfy the
! WHERE condition
! or all rows of a table if WHERE is omitted.</para>
<para>
The GROUP BY clause allows a user to divide a table
--- 190,204 ----
Description
</title>
<para>
! <command>SELECT</command> will return rows from one or more tables.
! Candidates for selection are rows which satisfy the WHERE condition;
! if WHERE is omitted, all rows are candidates.</para>
! <para>
! <command>DISTINCT</command> will eliminate all duplicate rows from the
! selection.
! <command>DISTINCT ON <replaceable class="PARAMETER">column</replaceable></command> will eliminate all duplicates in the specified column; this is
! equivalent to using <command>GROUP BY <replaceable class="PARAMETER">column</replaceable></command>. <command>ALL</command> will return all candidate rows,
! including duplicates.
<para>
The GROUP BY clause allows a user to divide a table
***************
*** 232,239 ****
</synopsis>
where <replaceable class="PARAMETER">cond_op</replaceable> can be
! one of: =, <, <=, >, >=, <>
! or a conditional operator like ALL, ANY, IN, LIKE, et cetera
and <replaceable class="PARAMETER">log_op</replaceable> can be one
of: AND, OR, NOT.
The comparison returns either TRUE or FALSE and all
--- 238,246 ----
</synopsis>
where <replaceable class="PARAMETER">cond_op</replaceable> can be
! one of: =, <, <=, >, >= or <>,
! a conditional operator like ALL, ANY, IN, LIKE, et cetera or a
! locally-defined operator,
and <replaceable class="PARAMETER">log_op</replaceable> can be one
of: AND, OR, NOT.
The comparison returns either TRUE or FALSE and all
***************
*** 251,260 ****
</title>
<para>
GROUP BY specifies a grouped table derived by the application
! of the this clause:
<synopsis>
GROUP BY <replaceable class="PARAMETER">column</replaceable> [, ...]
! </synopsis></para></refsect2>
<refsect2 id="R2-SQL-HAVING-2">
<refsect2info>
--- 258,273 ----
</title>
<para>
GROUP BY specifies a grouped table derived by the application
! of this clause:
<synopsis>
GROUP BY <replaceable class="PARAMETER">column</replaceable> [, ...]
! </synopsis></para>
! <para>
! GROUP BY will condense into a single row all rows that share the same values for the
! grouped columns; aggregates return values derived from all rows that make up the group. The value returned for an ungrouped
! and unaggregated column is dependent on the order in which rows happen to be read from the database.
! </para>
! </refsect2>
<refsect2 id="R2-SQL-HAVING-2">
<refsect2info>
***************
*** 312,319 ****
</programlisting></para>
<para>
! The columns in the ORDER BY must appear in the SELECT clause.
! Thus the following statement is illegal:
<programlisting>
SELECT name FROM distributors ORDER BY code;
</programlisting></para>
--- 325,332 ----
</programlisting></para>
<para>
! From release 6.4 of PostgreSQL, the columns in the ORDER BY clause do not need to appear in the SELECT clause.
! Thus the following statement is now legal:
<programlisting>
SELECT name FROM distributors ORDER BY code;
</programlisting></para>
***************
*** 394,400 ****
</programlisting>
<para>
To sum the column <literal>len</literal> of all films and group
! the reults by <literal>kind</literal>:
</para>
<programlisting>
SELECT kind, SUM(len) AS total FROM films GROUP BY kind;
--- 407,413 ----
</programlisting>
<para>
To sum the column <literal>len</literal> of all films and group
! the results by <literal>kind</literal>:
</para>
<programlisting>
SELECT kind, SUM(len) AS total FROM films GROUP BY kind;
***************
*** 410,416 ****
<para>
To sum the column <literal>len</literal> of all films, group
! the reults by <literal>kind</literal> and show those group totals
that are less than 5 hours:
</para>
<programlisting>
--- 423,429 ----
<para>
To sum the column <literal>len</literal> of all films, group
! the results by <literal>kind</literal> and show those group totals
that are less than 5 hours:
</para>
<programlisting>
***************
*** 525,530 ****
--- 538,547 ----
"AS" clause may be referenced in GROUP BY and HAVING clauses.
This is not currently
allowed in <productname>Postgres</productname>.
+ </para>
+
+ <para>
+ The DISTINCT ON phrase is not part of <acronym>SQL92</acronym>.
</para>
</refsect3>
--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP key from public servers; key ID 32B8FAA1
========================================
"My son, if sinners entice thee, consent thou not."
Proverbs 1:10
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [PATCHES] Documentation patch for COPY and SELECT
@ 1999-01-29 14:45 Thomas G. Lockhart <lockhart@alumni.caltech.edu>
parent: Oliver Elphick <olly@lfix.co.uk>
0 siblings, 0 replies; 2+ messages in thread
From: Thomas G. Lockhart @ 1999-01-29 14:45 UTC (permalink / raw)
To: Oliver Elphick <olly@lfix.co.uk>; +Cc: patches@postgreSQL.org; docs@postgreSQL.org
> This patch is to expand the reference documentation for COPY and
> SELECT:
Got it. Will apply to the development tree soon. Thanks.
- Tom
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~1999-01-29 14:45 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-01-29 11:01 Documentation patch for COPY and SELECT Oliver Elphick <olly@lfix.co.uk>
1999-01-29 14:45 ` Thomas G. Lockhart <lockhart@alumni.caltech.edu>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox