Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc G. Fournier1998-02-28 23:37:10 +0000
committerMarc G. Fournier1998-02-28 23:37:10 +0000
commit5b3e78afe3b207e5db91853f03a90f37e0fdb35f (patch)
tree9904735ba334a92da8f276e042cd3be7d1c7b53c /src/tutorial/syscat.source
parentbc58c5867df7d9ab3277e0ae1399d5dabb0308a8 (diff)
From: Darren King <darrenk@insightdist.com>
Seem to remember someone posting to one of the lists a while back that the tutorial code wouldn't compile and/or run. Found four problems with it that will let it run. 1. Tutorial makefile had a recursive use of DLOBJS. 2. Some tutorial needed semi-colons added to many statements. 3. Complex tutorial didn't clean up after itself. 4. Advanced had a time-travel example. Commented it out and put a line pointing the user to contrib/spi/README.
Diffstat (limited to 'src/tutorial/syscat.source')
-rw-r--r--src/tutorial/syscat.source24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/tutorial/syscat.source b/src/tutorial/syscat.source
index 90ed0e4ec5a..5234499be63 100644
--- a/src/tutorial/syscat.source
+++ b/src/tutorial/syscat.source
@@ -6,7 +6,7 @@
--
-- Copyright (c) 1994, Regents of the University of California
--
--- $Id: syscat.source,v 1.1.1.1 1996/07/09 06:22:34 scrappy Exp $
+-- $Id: syscat.source,v 1.2 1998/02/28 23:37:10 scrappy Exp $
--
---------------------------------------------------------------------------
@@ -80,11 +80,11 @@ SELECT u.usename, t.typname
-- lists all left unary operators
--
SELECT o.oprname AS left_unary,
- right.typname AS operand,
+ right_type.typname AS operand,
result.typname AS return_type
- FROM pg_operator o, pg_type right, pg_type result
+ FROM pg_operator o, pg_type right_type, pg_type result
WHERE o.oprkind = 'l' -- left unary
- and o.oprright = right.oid
+ and o.oprright = right_type.oid
and o.oprresult = result.oid
ORDER BY operand;
@@ -93,11 +93,11 @@ SELECT o.oprname AS left_unary,
-- lists all right unary operators
--
SELECT o.oprname AS right_unary,
- left.typname AS operand,
+ left_type.typname AS operand,
result.typname AS return_type
- FROM pg_operator o, pg_type left, pg_type result
+ FROM pg_operator o, pg_type left_type, pg_type result
WHERE o.oprkind = 'r' -- right unary
- and o.oprleft = left.oid
+ and o.oprleft = left_type.oid
and o.oprresult = result.oid
ORDER BY operand;
@@ -105,13 +105,13 @@ SELECT o.oprname AS right_unary,
-- lists all binary operators
--
SELECT o.oprname AS binary_op,
- left.typname AS left_opr,
- right.typname AS right_opr,
+ left_type.typname AS left_opr,
+ right_type.typname AS right_opr,
result.typname AS return_type
- FROM pg_operator o, pg_type left, pg_type right, pg_type result
+ FROM pg_operator o, pg_type left_type, pg_type right_type, pg_type result
WHERE o.oprkind = 'b' -- binary
- and o.oprleft = left.oid
- and o.oprright = right.oid
+ and o.oprleft = left_type.oid
+ and o.oprright = right_type.oid
and o.oprresult = result.oid
ORDER BY left_opr, right_opr;