In 'Joins between classes' in Section 5 of the tutorial we have, in
the first paragraph: As an example, say we wish to find all the records that are in the temperature range of other records. In effect, we need to compare the temp_lo and temp_hi attributes of each EMP instance to the temp_lo and temp_hi attributes of all other EMP instances. I believe that EMP should read WEATHER, as the example query that follows joins WEATHER to itself. EMP is often used in Oracle examples. Regards, Graham Other RULE cleanups
This commit is contained in:
parent
1045304a3b
commit
36da236eb3
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/query.sgml,v 1.13 2000/09/29 20:21:34 petere Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/query.sgml,v 1.14 2000/12/12 16:47:52 momjian Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="query">
|
<chapter id="query">
|
||||||
@ -273,8 +273,8 @@ SELECT * INTO TABLE temp FROM weather;
|
|||||||
As an example, say we wish to find all the records that
|
As an example, say we wish to find all the records that
|
||||||
are in the temperature range of other records. In
|
are in the temperature range of other records. In
|
||||||
effect, we need to compare the temp_lo and temp_hi
|
effect, we need to compare the temp_lo and temp_hi
|
||||||
attributes of each EMP instance to the temp_lo and
|
attributes of each WEATHER instance to the temp_lo and
|
||||||
temp_hi attributes of all other EMP instances.
|
temp_hi attributes of all other WEATHER instances.
|
||||||
<note>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
This is only a conceptual model. The actual join may
|
This is only a conceptual model. The actual join may
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_rule.sgml,v 1.19 2000/10/05 19:48:17 momjian Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_rule.sgml,v 1.20 2000/12/12 16:47:52 momjian Exp $
|
||||||
Postgres documentation
|
Postgres documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -208,14 +208,14 @@ ON UPDATE TO emp-1.salary WHERE emp-2.name = "Joe"
|
|||||||
CREATE RULE bad_rule_combination_1 AS
|
CREATE RULE bad_rule_combination_1 AS
|
||||||
ON SELECT TO emp
|
ON SELECT TO emp
|
||||||
DO INSTEAD
|
DO INSTEAD
|
||||||
SELECT TO toyemp;
|
SELECT * FROM toyemp;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
CREATE RULE bad_rule_combination_2 AS
|
CREATE RULE bad_rule_combination_2 AS
|
||||||
ON SELECT TO toyemp
|
ON SELECT TO toyemp
|
||||||
DO INSTEAD
|
DO INSTEAD
|
||||||
SELECT TO emp;
|
SELECT * FROM emp;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
This attempt to select from EMP will cause
|
This attempt to select from EMP will cause
|
||||||
|
Loading…
x
Reference in New Issue
Block a user